-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsayings.py
More file actions
34 lines (23 loc) · 673 Bytes
/
Copy pathsayings.py
File metadata and controls
34 lines (23 loc) · 673 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
## Creating a library to be used for 'say_ContinutationToSayings.py'
# def main():
# hello("world")
# goodbye("world")
# def hello(name):
# print(f"hello, {name}")
# def goodbye(name):
# print(f"goodbye, {name}")
# main()
## You need to also include this portion, instead of simply 'main()'
## Reason being that when you use this as code above, the main() will automatically output:
### hello, world
### goodbye, world
### hello, Robby
def main():
hello("world")
goodbye("world")
def hello(name):
print(f"hello, {name}")
def goodbye(name):
print(f"goodbye, {name}")
if __name__ == "__main__": # using the '__name__'
main()