Magic 8 ball
Guessing Game
Code:
import os
os.system("clear")
loop = 1
while loop == 1:
import random
raw_input("Ask your question: ")
a = ["Yes","No","Ask Again Later","Go die","Maybe"]
p = random.choice(a)
print(p)
Guessing Game
Code:
import random
import os
os.system("clear")
a = 0
g = 0
l = 1
b = ["1","2","3","4","5","6","7","8","9","10"]
c = random.choice(b)
while l == 1:
os.system("clear")
print "1) Single Player"
print "2) Two Players"
a = input("Chooce Amount Of Players: ")
os.system("clear")
if a == 1:
d = raw_input("Guess A Number Between One And Ten: ")
os.system("clear")
if c == d:
print "You Win!"
elif c != d:
print "You Lose..."
if a == 2:
e = raw_input("Player 1, Choose A Number Between One And Ten: ")
os.system("clear")
f = raw_input("Player 2, Guess A Number Between One And Ten: ")
os.system("clear")
if f == e:
print("Player 2 Wins!")
elif f != e:
print("Player 1 Wins!")
print "1) Play Again"
print "2) Exit"
g = input("Make Your Decision: ")
if g == 1:
l = 1
if g == 2:
l = 0
os.system("clear")