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, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
question
Computers and Technology, 24.06.2019 10:10
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
You know the right answer?
Using a script (code) file, write the following functions:
1. write the definition of a func...
Questions
Questions on the website: 13722361