I did it. I asked chatGPT to make a me multiple choice python quiz and then I copied it into a text file.
I used this site. https://pypi.org/project/text2qti/
It worked great. I think there are better options than this. I bet I can find one that connects directly to my course by api.
I couldn't figure out how to do questions like the last one on the text below though. The rest of the questions above work just fine.
Quiz title: 1 txt2qti
1. What is 2+3?
a) 6
b) 1
*c) 5
2. What is the result of the following expression? 4 + 5 x 3 - 7
A) 19
B) 22
C) 13
*D) 12
3. What is the output of the following code snippet?
x = 5
y = 7
print(x == y or x > y)
a) True
b) False
*c) x > y
You see I want to include code snippets like those below but this little program didn't make it clear on how to do that.
Quiz title: 1 txt2qti
1. What is 2+3?
a) 6
b) 1
*c) 5
2. What is the result of the following expression? 4 + 5 x 3 - 7
A) 19
B) 22
C) 13
*D) 12
3. What is the output of the following code snippet?
x = 5
y = 7
print(x == y or x > y)
a) True
b) False
*c) x > y
4. What is the value of x after the following code snippet is executed?
x = 10
if x < 5:
x = 0
else:
x = 1
a) 0
*b) 1
c) 5
d) 10
5. What is the result of the following expression? not (False and True)
a) True
*b) True
c) False
d) None of the above
6. What is the value of y after the following code snippet is executed?
x = 5
y = x if x > 10 else x + 10
a) 5
b) 10
c) 15
*d) 15
7. What is the output of the following code snippet?
x = 2
y = 3
print(x >= y and y < 5)
a) True
b) False
c) None
*d) False
8. What is the value of x after the following code snippet is executed?
x = 5
if x > 10:
x = x + 5
elif x > 5:
x = x + 10
else:
x = x + 15
a) 5
b) 10
c) 15
*d) 15
9. What is the output of the following code snippet?
x = 10
y = 5
print(not(x > y) or x < y)
a) True
b) False
*c) True
10. What is the value of x after the following code snippet is executed?
x = 5
y = 10
if x < y:
x = x + 1
if x > y:
x = x + 1
a) 5
b) 10
c) 11
*d) 6