You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
environmental impact depends on electricity source and battery recycling.""",
102
102
"prompt_type": "analysis",
103
103
"complexity": "complex"
104
+
},
105
+
106
+
# Code Generation
107
+
{
108
+
"text": "Write a Python function to check if a number is prime.",
109
+
"expected_summary": """def is_prime(n):
110
+
if n < 2:
111
+
return False
112
+
for i in range(2, int(n ** 0.5) + 1):
113
+
if n % i == 0:
114
+
return False
115
+
return True""",
116
+
"prompt_type": "code_generation",
117
+
"complexity": "medium"
118
+
},
119
+
{
120
+
"text": "Create a Python function to reverse a string.",
121
+
"expected_summary": """def reverse_string(s):
122
+
return s[::-1]""",
123
+
"prompt_type": "code_generation",
124
+
"complexity": "simple"
125
+
},
126
+
127
+
{
128
+
"text": "Explain what this code does: [x*x for x in range(10) if x % 2 == 0]",
129
+
"expected_summary": "This list comprehension creates a list of squares of even numbers from 0 to 9. It filters numbers where x modulo 2 equals 0 (even numbers) and squares them.",
130
+
"prompt_type": "code_explanation",
131
+
"complexity": "medium"
132
+
},
133
+
134
+
{
135
+
"text": "Write a Python function to implement binary search.",
0 commit comments