Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c365267

Browse files
committed
move to specific folder
1 parent a39642a commit c365267

File tree

4 files changed

+48
-12
lines changed

4 files changed

+48
-12
lines changed

‎Dice_Game.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
import random
1+
import random
22
import time
33

44
def wait():
55
time.sleep(2.0)
66

77
print("*"*50)
8-
print("Welcome to the Dice Game!")
9-
print("A Game of Luck")
8+
print("Welcome to Dice Game")
9+
print("A game of Luck")
1010
print("*"*50)
11-
print("Roll the die and if you roll a lucky six; You Win! :)")
11+
print("Roll the Dice and If 6 Come, You will Win :)")
1212

1313
while (True):
14-
user_input = input("Press 1 to role Die\n")
15-
14+
user_input = input("Press 1 to role Dice\n")
15+
1616
if(user_input == '1' or user_input == 1):
1717
num = random.randint(1,6)
18-
print("\nRolling the Die")
18+
print("\nRolling Dice")
1919
wait()
2020
if(num == 6):
2121
print("You got",num)
22-
print("Yay! You won!\n")
22+
print("You won\n")
2323
else:
24-
print("\nYou got",num,"\nAww! You Lost!\n")
24+
print("\nYou got",num,"\nYou Lost\n")
2525

2626
choice = input("Press Y to Play again\nPress N to Exit Game\n")
27-
27+
2828
if (choice == 'Y' or choice == 'y'):
2929
continue
3030
elif (choice == 'N' or choice == 'n'):
3131
break
3232
else:
33-
print("\nPlease Enter Y/N.")
34-
33+
print("\nPlease Enter valid Choice")
34+
3535
else:
3636
print("\nNot a valid option")

‎Dice_Game/Dice_Game.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import random
2+
import time
3+
4+
def wait():
5+
time.sleep(2.0)
6+
7+
print("*"*50)
8+
print("Welcome to the Dice Game!")
9+
print("A Game of Luck")
10+
print("*"*50)
11+
print("Roll the die and if you roll a lucky six; You Win! :)")
12+
13+
while (True):
14+
user_input = input("Press 1 to role Die\n")
15+
16+
if(user_input == '1' or user_input == 1):
17+
num = random.randint(1,6)
18+
print("\nRolling the Die")
19+
wait()
20+
if(num == 6):
21+
print("You got",num)
22+
print("Yay! You won!\n")
23+
else:
24+
print("\nYou got",num,"\nAww! You Lost!\n")
25+
26+
choice = input("Press Y to Play again\nPress N to Exit Game\n")
27+
28+
if (choice == 'Y' or choice == 'y'):
29+
continue
30+
elif (choice == 'N' or choice == 'n'):
31+
break
32+
else:
33+
print("\nPlease Enter Y/N.")
34+
35+
else:
36+
print("\nNot a valid option")

‎LICENSE renamed to ‎Dice_Game/LICENSE

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /