Answer:
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.
Programmers refer to a brief section of reusable source code, machine code, or text as a “snippet.” These are typically explicitly defined operational units that are integrated into bigger programming modules.
<h3>What are the short piece of code in python?</h3>
Guido van Rossum created Python, an interpreted, object-oriented, high-level programming language with dynamic semantics. It was first made available in 1991.
The syntax of Python is straightforward and resembles that of English. Python's syntax differs from various other programming languages in that it enables programmers to construct applications with fewer lines of code.
Therefore, Python operates on an interpreter system, allowing for the immediate execution of written code. As a result, prototyping can proceed quickly.
Learn more about python here:
brainly.com/question/10718830
#SPJ1
A(n) stack trace is a list of all the steps that make up the performance chain when an exception is thrown.
<h3>What exactly is a stack trace?</h3>
- A stack trace is a report of the active stack frames at a specific point in the execution of a program in computing (also known as a stack backtrace or stack traceback).
- Memory is frequently dynamically allocated in two locations during program execution: the stack and the heap.
- As implied by their names, memory is continually allocated on a stack but not on a heap.
- This stack is known as the program's function call stack in order to distinguish it from the programming construct stack, which is another term for stack.
- In terms of technology, after a memory block has been assigned
To learn more about stack trace, refer to:
brainly.com/question/15886149
#SPJ4