-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNumber-Fact_Gen.py
More file actions
53 lines (30 loc) · 1.06 KB
/
Number-Fact_Gen.py
File metadata and controls
53 lines (30 loc) · 1.06 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
numbers = input("Enter yout list of number seperated by spaces: ")
n = numbers.split(" ")
#n = [1, 190, 29, -3, 299002]
print("Your list is:", n)
length = len(n)
l = int(n[0])
s = int(n[0])
for a in n:
a = int(a)
if l < a :
l = a
if s > a :
s = a
def state_facts(x):
if length < 5:
print("Your list lenth was only", length,", try entering a longer list!")
elif length >= 5 and length < 10:
print("Your list length was a good", length, "numbers!")
elif length >= 10 and length <= 20:
print("Your list contained a whopping", length, "numbers!! Wow")
elif length > 20:
print("YOUR LIST CONTAINED", length, "NUMBERS?!?! UNBELIEVABLE! Thanks for taking the time and effort to write all of that. :)")
else:
print("Lol this statement's never gonna get printed")
print("The first number that you entered was:", n[0])
print("The last number that you entered was:", n[-1])
print("Your Maximum is:", l)
print("Your Minimum is:", s)
print("Note:", x)
state_facts("Well, I guess that was it.")