-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRd.py
102 lines (56 loc) · 3.31 KB
/
Rd.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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import random # Importing random module
import time # Importing time module
repeat = 1 # repeat Variable
sleeptime = 1 # Variable of time of sleeping in seconds
word = input("Start? ") # Quest user for start of the program
sv = 0 # some Variable
if word == "yes": # Check for answer yes
print("Generating",end = "") # Printing Generating in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".",end = "") # Printing . in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".",end = "") # Printing . in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".") # Printing . in the console with a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print("Done!") # Showing Done! in the console
time.sleep(slleptime) # Waiting sleepime seconds betwen actions
else: # If user type something else
print("Generating",end = "") # Printing Generating in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".",end = "") # Printing . in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".",end = "") # Printing . in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".") # Printing . in the console with a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print("Done!") # Showing Done! in the console
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
number = random.random() # Genrating number between 0 and 1
number = number // 0.01 # converting this number up to hundred
print("Your number is",int(number)) # Showing this number in the console, and convert it to int
time.sleep(sleeptime)
while repeat == 1:
try:
num = int(input("Want to repeat? 1 - yes. 2 - stop the porgramm "))
if num == 1:
print("Generating",end = "") # Printing Generating in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".",end = "") # Printing . in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".",end = "") # Printing . in the console without a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print(".") # Printing . in the console with a new line
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
print("Done!") # Showing Done! in the console
time.sleep(sleeptime) # Waiting sleepime seconds betwen actions
number = random.random() # Genrating number between 0 and 1
number = number // 0.01 # converting this number up to hundred
print("Your number is",int(number))
elif num == 2:
repeat = 0
else:
print("Some wrong!")
except:
print("You type something wrong!")
print("Work done!")