Question: Data Programming l: Write a program that takes two numbers. Get the first number as an integer and the second one as a float number.

Data Programming l:

  1. Write a program that takes two numbers. Get the first number as an integer and the second one as a float number. Then, compute the following expressions: number1//2, number1/number2, number1*number2, and 3**number2. Display the result and type of each expression. (Should use type function to get the type of each expression)

    Output:

    Number1 is 17

    Number2 is 12.0

    17//2 = 8 ,

    17/12.0 = 1.4166666666666667 ,

    17*12.0 = 204.0 ,

    3**12.0 = 531441.0 ,

  2. Write a program that takes a number as a Fahrenheit temperature, and convert it to the Celsius temperature, and print out the converted temperature. Use the round function to have at most 2 decimal places in the output.

    Output:

    The 75 degree Fahrenheit is equal to 23.89 degree Celsius.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!