-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
42 lines (30 loc) · 858 Bytes
/
example.py
File metadata and controls
42 lines (30 loc) · 858 Bytes
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
import os
def main():
print('Hello world!')
print("This is Alice's greeting.")
print('This is Bob\'s greeting.')
foo(5, 10)
print('=' * 10)
text = 'The current working directory is '
print (text + os.getcwd())
foods = ['apples', 'oranges', 'cats']
for food in foods:
print('I like to eat', food)
print('Count to ten:')
for i in range(l, 11):
print(i)
def foo(a, b):
value = a + b
print('%s plus %s is equal to %s' % ( a, b, value))
if value < 50:
print('foo')
elif (value >= 50) and ((a == 42) or (b == 24)):
print('bar')
else:
print('moo')
'''A multi-
line stringj but can also be a multi-line comment.'1'
return value # This is a one-Line comment'''
return value # This is one comment
if __name__ == '__main__':
main()