Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the answer for part A , B and part E Homework Question a)- Write and run a Python program that outputs the value

I need the answer for part A , B and part E image text in transcribed
Homework Question a)- Write and run a Python program that outputs the value of each of the following expressions 5.0/9.0 5.0/9 /9.0 5/9 9.0/5.0 9.0/5 9/5.0 9/S now please try it with the truncated division operator 5.0/19.0 5.0//9 5779.0 5/19 9.0//5,0 9.0//5 91/5.0 91/5 Based on your results, what is the rule for arithmetic operators when integers and floating point numbers are used? b)- Write and run a Python program that asks the user for a temperature in Celsius and converts and outputs the temperature in Fahrenheit. (Use the formula given in the example above and solve for tempF in terms of tempc.) cHere is an algorithm to print out n! (n factorial) from 0! to 19: 1. Set f1 2. Set n 0 3. Repeat the following 20 times: use range (1,20) although range (20) wil1 also work but not match5 a. Output n. "!-E b. Add 1 ton c. Multiply f by n Using a for loop, write and run a Python program for this algorithm. d)-Modify the program above using a while loop so it prints out all of the factorial values that are less than 1 billion. e)-Repeat #c above using list comprehensions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions