subject

CSCD 110

# This program uses value functions to do some conversions.
# Define our constant variables
# These are our menu options
F_TO_C = 1
C_TO_F = 2
F_TO_M = 3
M_TO_F = 4
EXTRA = 5
QUIT = 0
# We need a main function
def main():
choice = 7
while choice != QUIT:
display_menu() # Call to display our menu
choice = int(input("Please enter a menu choice: "))
if choice == F_TO_C:
temp = float(input("Please enter a temperature in degrees Fahrenheit."))
print(temp, "degrees Fahrenheit is equal to ", convert_to_celcius(temp),"degrees Celcius")

def convert_to_celcius(fahrenheit):
return (fahrenheit - 32) * 5/9
def display_menu():
print(" Menu")
print("1. Convert from Fahrenheit to Celsius.")
print("2. Convert from Celsius to Fahrenheit.")
print("3. Convert Feet to Meters.")
print("4. Convert Meters to Feet.")
print("5. Print a string backwards.")
print("0. Quit.")

Why does my menu function not display in the python shell? Plz Help.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:10
Which is a benefit of peer-to-peer networking? easy to add or remove devices main server has a fast processor more reliable than a client/server network same software versions on all computers
Answers: 3
question
Computers and Technology, 22.06.2019 14:20
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
question
Computers and Technology, 22.06.2019 23:00
Which factor is the most important when choosing a website host? whether customers will make secure transactions the number of email accounts provided the purpose of the website the quality of the host control panel
Answers: 3
question
Computers and Technology, 23.06.2019 02:30
How to launch an app: steps to be successful? launching an app is a great idea, but it’s not that easy as we supposed to think. the majority of mobile applications don’t generate revenue because companies aren’t ready to be competitive. referring to our experience in successfully building and launching apps we hope to you omit these difficulties. we are going to talk about ideas, marketing, testing your product, its development, distribution and support. you will learn 8 product launch stages to succeed.
Answers: 1
You know the right answer?
CSCD 110

# This program uses value functions to do some conversions.
# Define our...
Questions
question
Physics, 03.03.2021 06:30
question
Mathematics, 03.03.2021 06:40
question
Mathematics, 03.03.2021 06:40
question
Chemistry, 03.03.2021 06:40
question
Mathematics, 03.03.2021 06:40
question
Mathematics, 03.03.2021 06:40
question
Mathematics, 03.03.2021 06:40
question
History, 03.03.2021 06:40
Questions on the website: 13722363