subject

Using a script (code) file, write the following functions:
1. write the definition of a function that take one number, that represents a temperature in fahrenheit and prints the equivalent temperature in degrees celsius.
2. write the definition of another function that takes one number, that represents speed in miles/hour and prints the equivalent speed in meters/second.
3. write the definition of a function named main. it takes no input, hence empty parenthesis, and does the following:
o prints enter 1 to convert fahrenheit temperature to celsius
o prints on the next line, enter 2 to convert speed from miles per hour to meters per second.
o take the input, lets call this main input, and if it is 1, get one input then call the function of step 1 and pass it the input.
o if main input is 2, get one more input and call the function of step 2.
o if main input is neither 1 or 2, print an error message.
after you complete the definition of the function main, write a statement to call main.
below is an example of how the code should look like:
#sample code by student name #created on some date #last edit on another date
def func1(x):
print(x)
def func2(y):
print(y)
print(' ')
print(y)
def main():
func1('hello world')
func2('hello again')
#below we start all the action
main()
remember to add comments, and that style and best practices will counts towards the points. a program that just "works" is not a guarantee for full credit. submit your source code file.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Pls do you believe that the use of 3d animation has grown in feature films over the last few years? if so, do you think the trend will continue? what are the forces driving this trend?
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
You know the right answer?
Using a script (code) file, write the following functions:
1. write the definition of a func...
Questions
question
Mathematics, 24.12.2019 18:31
question
Social Studies, 24.12.2019 18:31
Questions on the website: 13722360