Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time, os, random
- from color import randomColor
- randomColor()
- mercury = "57.9"
- venus = "108.2"
- earth = "149.6"
- mars = "227.9"
- jupiter = "778.3"
- saturn = "1.427"
- uranus = "2.869"
- neptune = "4.496"
- pluto = "5.9"
- mercury2 = "57900000"
- venus2 = "108200000"
- earth2 = "149600000"
- mars2 = "227900000"
- jupiter2 = "778300000"
- saturn2 = "1427000000"
- uranus2 = "2869000000"
- neptune2 = "4496000000"
- pluto2 = "5900000000"
- def main():
- print "Planetary Distance from the Sun"
- time.sleep(.5)
- rand = random.randint(1,1)
- if rand==1:
- Mercury()
- elif rand==2:
- Venus()
- elif rand==3:
- Earth()
- elif rand==4:
- Mars()
- elif rand==5:
- Jupiter()
- elif rand==6:
- Saturn()
- elif rand==7:
- Uranus()
- elif rand==8:
- Neptune()
- else:
- Pluto()
- def Mercury():
- ans = raw_input("How far is Mercury from the sun? ")
- if mercury or mercury2 in ans:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Mercury()
- def Venus():
- ans = raw_input("How far is Venus from the sun? ")
- if ans == venus or venus2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Venus()
- def Earth():
- ans = raw_input("How far is Earth from the sun? ")
- if ans == earth or earth2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Earth()
- def Mars():
- ans = raw_input("How far is Mars from the sun? ")
- if ans == mars or mars2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Mars()
- def Jupiter():
- ans = raw_input("How far is Jupiter from the sun? ")
- if ans == jupiter or jupiter2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Jupiter()
- def Saturn():
- ans = raw_input("How far is Saturn from the sun? ")
- if ans == saturn or saturn2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Saturn()
- def Uranus():
- ans = raw_input("How far is Uranus from the sun? ")
- if ans == uranus or uranus2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Uranus()
- def Neptune():
- ans = raw_input("How far is Neptune from the sun? ")
- if ans == neptune or neptune2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Neptune()
- def Pluto():
- ans = raw_input("How far is Pluto from the sun? ")
- if ans == pluto or pluto2:
- print "Correct!"
- time.sleep(.5)
- os.system("cls")
- main()
- else:
- print "Incorrect!"
- Pluto()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement