Question: Hello I have been playing around with a menu function, which requires to write in Python a program with the following specification. Design the following
Hello I have been playing around with a menu function, which requires to write in Python a program with the following specification.
Design the following menu:
G] Get a number
S] Display current sum
A] Display current average
H] Display the current highest number
L] Display the current lowest number
Q] Quit
If the user enters G, S, A H or L before selectin Q the program needs to advise the user to go and enter a number first, in other words needs to include error checking Sources could should be written in such a way that it will work regardless of the value entered of the variable. I started from the image below I need some help.

def main(): print("G Get a Number") print ("S Display current sum") print ("A Display current Average") print("H Display teh current hight number") print("I Display the current lowest number") print("Q to Quit") selection=int (input ("Enter your choice:")) if selection==G: Number() elif selection==Sum sum() Main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
