Text Size
Text Size
Exit Full Screen
Python Mini
Show
Source Code
View Source Code in Full Screen
Open in New Tab
#trivia quiz badge import time time.sleep (1) print "Welcome to my trivia game" print "" time.sleep (1) what1=input ("What is the color of the light of the street light?").lower() if what1== "red": print "correct!it is red" else: print "Wrong!, the correct answer is that the red light is on top." #if what1 == "red" or " Red" # what1=what1.lower() what2=input ("What color is the sky?").lower() if what2== "blue": print "correct!it is blue" else: print "Wrong!, the correct answer is the sky is blue." what3=input ("What is a football made out of?").lower() if what1== "pig skin": print "correct!it is pig skin" else: print "Wrong!, the correct answer is pig skin." time.sleep (2) print"" print"thanks for playing"
Trivia.py
( around 26 lines python code )
Published By:
Cartman
Published on
2023-01-09T17:09:18Z
Python Mini
- an
OYOclass
application,
own your own class today
.
Run
Result
×
Error message shows here