-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloops.py
46 lines (35 loc) · 1.13 KB
/
loops.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
# Loops and iteration
# 1. for loop -- iteration
# for each item in some collection, do ssome stuff
# Your list
programs_to_write = [
"slightly better bash script",
"web crawler",
"port scanner",
"web application",
"cloud provisioning tool",
]
# Basic From - INDENTATION is key!
# for program_name in programs_to_write:
# print ("I'm going to write a", program_name) #capitalize
# print ("\n ... We're done!")
# print ("but it's not all fun -- the loop variable --",program_name, "still exists")
# # while loop -- a traditional loop
# something__true = True
# while (something_true):
# print ("Welcome to my game!")
# print ("Going through the loop")
# # possiblly """ """make something_true = Fsles
# something_true = False
# print("We are done. something_true is now ... um err ", something_true)
# Print Meow some number of times with input
#Break into functions Main - Meow function and Get Input function
def main():
number = get_number()
meow(number)
def get_number():
n = input("Give me a number greater than 0: ")
return n
def meow ():
print ("Meow")
main()