forked from ianmisner/BIO309_Spring2017
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandalone.py
36 lines (34 loc) · 814 Bytes
/
standalone.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
"""greatest modeule ever"""
def countdown_from_y_to_x(y, x):
"""greatest function ever"""
n=y
while(n>=x):
print(n)
n = n-1 #n -= 1
def sum_it(z,g):
"""NO, greatest function ever"""
n=z
all_numbers = []
while(n>=g):
#print(n)
all_numbers.append(n)
n = n-1 #n -= 1
s=0
for i in all_numbers:
s = s + i
if (z == 0) and (g==0):
return s, "summation OF ZERO successful!"
else:
if (s == 0):
return s, "summation FAILED"
else:
return s, "summation successful!"
my_result = sum_it(10,5)
print(my_result)
my_result = sum_it(20,5)
print(my_result)
my_result = sum_it(1000,5)
print(my_result)
#countdown_from_y_to_x(35,30)
#countdown_from_y_to_x(44,30)
#countdown_from_y_to_x(55,30)