-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
86 lines (78 loc) · 2.37 KB
/
test.py
File metadata and controls
86 lines (78 loc) · 2.37 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from random import randint
import time
gamelist = ["rock", "paper", "scissors"]
machine = gamelist[randint(0,2)]
player = False
againplayer = False
print ()
print ("Welcome to the game 'Rock-Paper-Scissors' written with Python3 by Yasen Kostov")
time.sleep(5)
print ()
print ("The Machine is ready, are you?")
time.sleep(4)
print ()
while player == False:
player = input("Chose something between 'rock', 'paper' or 'scissors': ")
print ()
time.sleep(1)
print ("3")
time.sleep(1)
print ("2")
time.sleep(1)
print ("1")
time.sleep(1)
print ()
if player == machine:
print ("Draw! The Machine chose ", machine, "too")
elif player == "rock":
if machine == "paper":
print ("You lost! The Machine chose 'paper'")
else:
print ("You Won! The Machine chose 'scissors'")
elif player == "paper":
if machine == "scissors":
print ("You Lost! The Machine chose 'scissors'")
else:
print ("You Won! The Machine chose 'rock'")
elif player == "scissors":
if machine == "rock":
print ("You Lost! The Machine chose 'rock'")
else:
print ("You Won! The Machine chose 'paper'")
else:
print ("Something went wrong.. Be sure to answer me only with 'rock', 'paper' or 'scissors'")
print ()
time.sleep(5)
again = input("You wanna try again? (yes, no): ")
if again == "yes":
print ()
player = False
machine = gamelist[randint(0,2)]
elif again == "no":
print ()
print ("Ok! Goodbye then!")
time.sleep(2)
else:
while againplayer == False:
print ()
time.sleep(1)
print ("Uh..")
time.sleep(1)
print ("Are you absolutely sure you told me what I need to?")
time.sleep(3)
print ()
again2 = input("Want one more shot? (yes, no): ")
if again2 == "yes":
print ()
player = False
againplayer = True
machine = gamelist[randint(0,2)]
time.sleep(2)
elif again == "no":
print ()
print ("Ok, goodbye!")
else:
print ()
againplayer = False
machine == gamelist[randint(0,2)]
# Written by Yasen Kostov