-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject_builder_1_4.py
More file actions
37 lines (33 loc) · 1.01 KB
/
project_builder_1_4.py
File metadata and controls
37 lines (33 loc) · 1.01 KB
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
#!/usr/bin/env python3
'''Alta3 Research | plack@alta3.com
Display a menu using the main() runtime function and a user-defined
function.'''
line = '*'*30
title = 'Welcome to Project 3000'
option_1 = '1. Walk the dog'
option_2 = '2. Eat lunch'
option_3 = '3. Launch missiles'
def show_menu():
'''Display a set of options, prompt user for selection, and
print the selection to standard out.'''
print(line)
# Display the title of the program.
print(title)
print(line)
# Display the menu options.
print(option_1)
print(option_2)
print(option_3)
print(line)
# Prompt the user for input.
# Remember the 'choice' variable is a string.
choice = input('Select a menu option and press enter (1-3): >> ')
print()
# Display the selection using parameters.
#print('You chose option', choice, '.')
# Or, Display the selection using concatenation.
print('You chose option ' + choice + '.')
def main():
'''Runtime function.'''
show_menu()
main()