random question generator python
import random
# from random import choice
questions = ['Question1', 'Question2', 'Question3']
random_item = random.choice(questions)
print (random_item)
random question generator python
import random
# from random import choice
questions = ['Question1', 'Question2', 'Question3']
random_item = random.choice(questions)
print (random_item)
how to make a random question generator in python
num1 = random.randint(1, 10)
num2 = random.randint(1, 10)
answer = int(input(f"What is {num1} + {num2}?\n"))
if answer == (num1 + num2):
print("Correct")
else:
print("Wrong")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us