Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time, os
- points = 0
- time.sleep(3)
- print('Computer Trivia Game')
- print('Version 1.0.3')
- if os.path.exists("data.ini"):
- time.sleep(5)
- print('TROPHY: You beat the game')
- time.sleep(5)
- print('NOTE: Due to problems, if you fail a question you need to restart the program. This will be fixed in later versions.')
- time.sleep(3)
- print('Loading trivia...')
- time.sleep(10)
- print('Question 1:')
- print('What part of the computer stores information but is read only?')
- print('a) Hard Disk')
- print('b) RAM')
- print('c) Motherboard')
- print('d) ROM')
- print('Type the letter that is assigned to the answer.')
- q1 = input()
- if q1 == 'd':
- points = 1
- print('Correct!')
- print('You currently have',points,'points')
- time.sleep(3)
- print('Question 2:')
- print('What is the slowest media out of these:')
- print('a) SSD')
- print('b) RAM')
- print('c) CD-ROM')
- print('d) USB')
- print('Type the letter that is assigned to the answer.')
- q2 = input()
- if q2 == 'c':
- points = 2
- print('Correct!')
- print('You currently have',points,'points')
- time.sleep(3)
- print('Question 3:')
- print('A computer cannot work without')
- print('a) USB')
- print('b) CPU')
- print('c) DVD Drive')
- print('d) Microsoft Word')
- print('Type the letter that is assigned to the answer.')
- q3 = input()
- if q3 == 'b':
- points = 3
- print('Correct!')
- print('You currently have',points,'points')
- time.sleep(3)
- print('Question 4:')
- print('How do we measure the speed of a CPU?')
- print('a) MB')
- print('b) GHZ')
- print('c) HZ')
- print('d) TB')
- print('Type the letter that is assigned to the answer.')
- q4 = input()
- if q4 == 'b':
- points = 4
- print('Correct!')
- print('You currently have',points,'points')
- time.sleep(3)
- print('Question 5:')
- print('What does SSD mean?')
- print('a) Super Speed Drive')
- print('b) Speedy Sport Disk')
- print('c) Solid State Drive')
- print('d) Solid Speed Drive')
- print('Type the letter that is assigned to the answer.')
- q5 = input()
- if q5 == 'c':
- points = 5
- print('Correct!')
- print('You currently have',points,'points')
- time.sleep(3)
- print('Question 6:')
- print('What connection do most hard drives use today?')
- print('a) SATA')
- print('b) Micro-USB')
- print('c) HDMI')
- print('d) Ethernet')
- print('Type the letter that is assigned to the answer.')
- q6 = input()
- if q6 == 'a':
- points = 6
- print('Correct!')
- print('You beat the game for now!')
- print('You finished the game with',points,'points')
- if points = 6:
- with open("data.ini", "a") as file:
- file.write("finished_game = 1")
- print('Expect more updates soon!')
- input('Press any key to exit')
- else:
- print('Incorrect answer!')
- print('You failed the game with',points,'points')
- input('Press any key to exit')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement