-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathHelloNiam.py
70 lines (51 loc) · 1 KB
/
HelloNiam.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
print(5*5*5)
#awesome
for x in range(0,3):
print'Value of x:', x
#loop
string = 'hello'
for letter in string:
print(letter)
#or
lister = (0, 1, 'hey')
for value in lister:
print value
#while loop
print ("while loop")
var = 10
while(var>0):
print(var)
var-= 1
print("loop exited")
var = 10
while True:
var -= 1
print(var)
if (var == 0):
break
print("done loop")
#cool, now:
var1 = 10
while True:
var1 -= 1
if (var1 == 6):
continue #no 6 when the model is running (it is skipped)
print(var1)
if (var1 == 0):
break
print("Done loop")
var1 = 10
for x in range(3):
pass #nothing happens when I run it
#inputs from USER
number = int(input("Number:"))
print"The value of my time is", number,"dollars per hour."
str.nombre = input("Name:")
print"Your name is", nombre
##FUNCTIONS
def sum_list(lister):
sum = 0
for x in lister:
sum += x
print (sum)
#define lister and you can call the function by saying sum_list(lister)