prompt: Write a Python function that returns the square of a number.

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*')

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even.

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10.

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string.

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x)

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes")

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers.

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper())

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.


prompt: Write a Python function that returns the square of a number. # variation

completion:
def square(n):
    return n * n


prompt:
Fix the bug in this Python function:

def greet(name)
    return "Hello " + name # variation

completion:
def greet(name):
    return "Hello " + name


prompt:
What does this code do?

for i in range(1, 6):
    print(i * '*') # variation

completion: It prints a right-angled triangle of asterisks with 5 lines.


prompt: Write Python code to check if a number is even. # variation

completion:
def is_even(n):
    return n % 2 == 0


prompt: Write Python code to count from 1 to 10. # variation

completion:
for i in range(1, 11):
    print(i)


prompt: Write a Python function that reverses a string. # variation

completion:
def reverse_string(s):
    return s[::-1]


prompt:
What does this code do?

x = [1, 2, 3]
x.append(4)
print(x) # variation

completion: It adds 4 to the list x and prints [1, 2, 3, 4].


prompt:
Fix the error in this code:

if 5 > 3
    print("Yes") # variation

completion:
if 5 > 3:
    print("Yes")


prompt: Write Python code to find the largest of three numbers. # variation

completion:
def largest(a, b, c):
    return max(a, b, c)


prompt:
Explain this Python code:

name = "Alice"
print(name.upper()) # variation

completion: It converts the string 'Alice' to uppercase and prints 'ALICE'.