-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.py
54 lines (43 loc) · 1.16 KB
/
Test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#Python 3.4
import random
def main():
play = None
quoteNumber = 0
print("*****Press enter to continue each step*****\n")
name = input("Please type your name: ")
print("Hi %s" % (name))
inspirationalQuote()
print("Do you want to play a game? (Y/N)")
play = decidePlayGame()
#to keep windows open
print("\n*****Press enter to exit program*****")
input()
def decidePlayGame():
flag = False
playGame = None
while flag == False:
decision = str.upper(input(">> "))
if decision == "Y":
print("Cool lets get into it then")
flag = True
playGame = True
elif decision == "N":
print("Well, you playing anyway")
flag = True
playGame = False
return playGame
def inspirationalQuote():
greeting = "\nHere is your daily inspirational quote: \n"
quotes = ["Wira1"
, "Wira2"
, "Wira3"
, "Wira4"
, "Wira5"
, "Wira6"
, "Wira7"
, "Wira8"
, "Wira9"
, "Wira10"]
inspirationalQuote = quotes[random.randint(0, 9)]
input(greeting + inspirationalQuote)
main()