![liapooh73p7b896](/avatars/19423.jpg)
liapooh73p7b896
16.12.2021 •
Computers and Technology
Why are my questions being removed? What did I ever ask to be violating the guidelines?? Somebody tell me!
Solved
Show answers
More tips
- G Goods and services Should You Engrave Your Wedding Rings? Facts, Myths, and Considerations...
- L Leisure and Entertainment How to Land on the Moon: Your Comprehensive Guide...
- T Travel and tourism How to Use a Compass: A Beginner s Guide...
- C Computers and Internet Porn Banner: What It Is and How to Get Rid Of It?...
- C Computers and Internet Отправляем смс через интернет: легко и просто...
- L Leisure and Entertainment The Best Film of 2010: A Look Back at the Academy Awards...
- H Health and Medicine Simple and Effective: How to Get Rid of Cracked Heels...
- O Other How to Choose the Best Answer to Your Question on The Grand Question ?...
- L Leisure and Entertainment History of International Women s Day: When Did the Celebration of March 8th Begin?...
Ответ:
def func1(x):
return (x-32)*(5/9)
def func2(x):
return (x/2.237)
def main():
x = ""
while x != "x":
choice = input("Enter 1 to convert Fahrenheit temperature to Celsius\n"
"Enter 2 to convert speed from miles per hour to meters per second: ")
if choice == "1":
temp = input("please enter temperature in farenheit: ")
print(func1(float(temp))," degrees celcius.")
elif choice == "2":
speed = input("please enter speed in miles per hour: ")
print(func2(float(speed))," meters per second")
else:
print("error... enter value again...")
x = input("enter x to exit, y to continue")
if __name__ == "__main__":
main()
Explanation:
two function are defines func1 for converting temperature from ferenheit to celcius and func2 to convert speed from miles per hour to meters per second.