-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCar_TUI2.py
More file actions
42 lines (32 loc) · 1.14 KB
/
Car_TUI2.py
File metadata and controls
42 lines (32 loc) · 1.14 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
38
39
40
41
42
LINE_WIDTH = 40
def display_separator(msg=""):
dashes = "-" * LINE_WIDTH
print(f"{dashes}\n{msg}\n{dashes}")
def display_completed_message():
display_separator("Process completed!")
def display_error_message(msg):
print(f"Error! {msg}\n")
def started(msg=""):
display_separator(msg)
def menu():
print("""
What operation would you like to perform? Please make a selection:
View car information
[A] Access a car record by ID.
[B] Access cars by their cylinder number.
[C] Access cars by body category.
[D] Access basic information of a car by ID...
Access car names and sales records
[E] Access car names alphabetically.
[F] Access total sales of cars based on body type.
[G] Access the 5 most expensive cars based on body type.
[H] Access mean sales for each car name.
Access visualization of car records
[I] View a bar chart of cars per fuel system.
[J] View a graph of the horsepower for the 5 cheapest cars.
[K] To exit the program
""")
selection = input("Your selection is: ").strip().lower()
return selection
def started(msg=""):
display_separator(msg)