QuizGame.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. print(" Welcome To My Quiz Game \n Interesting Game to Play")
  2. Player = input(" Do you want to play the game? \n" )
  3. if Player.lower() != 'yes':
  4. print("Good Bye")
  5. quit()
  6. name_player = input("Enter Your Name: ")
  7. print("Let's Start the Game :) ",name_player)
  8. score = 0
  9. answer = input(' What is CPU stands for? \n ')
  10. if answer.lower() == 'central processing unit':
  11. print("Correct")
  12. score += 1
  13. else:
  14. print('Wrong')
  15. answer = input(' What is GPU stands for? \n ')
  16. if answer.lower() == 'graphical processing unit':
  17. print("Correct")
  18. score += 1
  19. else:
  20. print('Wrong')
  21. answer = input(' What is RAM stands for? \n ')
  22. if answer.lower() == 'random access memory':
  23. print("Correct")
  24. score += 1
  25. else:
  26. print('Wrong')
  27. answer = input(' What is ROM stands for? \n ')
  28. if answer.lower() == 'read only memory':
  29. print("Correct")
  30. score += 1
  31. else:
  32. print('Wrong')
  33. answer = input(' Mouse is an input device or output device? \n ')
  34. if answer.lower() == 'input device':
  35. print("Correct")
  36. score += 1
  37. else:
  38. print('Wrong')
  39. print("You got the " + str(score)+ " correct answers")
  40. print("You got the " + str((score/5) *100)+ " correct answers")