Format
There really is no hope of making this code even half-way decent without spending the time to rewrite them all properly. Don't want to do any of that
This commit is contained in:
22
IO/Idioms.py
22
IO/Idioms.py
@@ -1,7 +1,7 @@
|
||||
#Idioms
|
||||
# Idioms
|
||||
import random
|
||||
|
||||
#Check user input
|
||||
# Check user input
|
||||
s = 200
|
||||
|
||||
while (s < 1) or (s > 99):
|
||||
@@ -12,28 +12,28 @@ while (s < 1) or (s > 99):
|
||||
print("Ok")
|
||||
|
||||
|
||||
#Find biggest number
|
||||
# Find biggest number
|
||||
output = 0
|
||||
for i in range(100):
|
||||
n = random.randint(1, 1000)
|
||||
if n > output:
|
||||
output = n
|
||||
|
||||
|
||||
print(output)
|
||||
|
||||
|
||||
#Summ up
|
||||
summ = 0
|
||||
# Sum up
|
||||
sum = 0
|
||||
for i in range(100):
|
||||
n = random.randint(1, 1000)
|
||||
summ += n
|
||||
|
||||
print(summ)
|
||||
sum += n
|
||||
|
||||
print(sum)
|
||||
|
||||
|
||||
#even or uneven?
|
||||
# even or uneven?
|
||||
z = random.randint(1, 1000)
|
||||
if (z % 2) == 1:
|
||||
print("odd")
|
||||
else:
|
||||
print("even")
|
||||
print("even")
|
||||
|
||||
Reference in New Issue
Block a user