Answer to Question #258202 in Python for Kyle

Question #258202

Create a dictionary of at least 20 Python terms as the keys and the values will be a short definition. You can find terms anywhere you wish Your program should generate 25 quizzes using a random selection of terms with 4 answer options (A, B, C and D). Set the os.chdir() command to reflect where you will be saving the files on your computer. 


1
Expert's answer
2021-10-28T14:17:56-0400
name = input ("enter your name: ")

print ("hello", name, "welcome to the quiz world") 
score=0
for i in questions:
print ()

print (i)

flagl = input ("Do you want to skip this question (yes/no): ")

if flag1=="yes":
    continue
ans = input ("enter the answer (a/b/c/d) :")

if ans==questions[i]:
 print ("correct answer, you got 1 point") 
 score = score+1

print ("current score is:", score)
else:
      print("wrong answer, you lost 1 point") 
      score=score-1
      print ("current score is:", score)
        flag2= input ("Do you want to quit (yes/no) :")
     if flag2 == "yes":
      break
      print("Final score is: ", score)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog