Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use Python Problem 1: 1.a Create a While loop to convert the following temperatures from Fahrenheit to Celsius Temp = [70, 75, 80, 85,

Please use Python

Problem 1:

1.a

Create a While loop to convert the following temperatures from Fahrenheit to Celsius

Temp = [70, 75, 80, 85, 90, 95, 100, 105, 110, 115]

Formula: c = (f-32) * (5/9)

where c = temperature in Celsius and f = temperature in Fahrenheit

1.b

Rewrite the above iteration using while loop as an iteration using For loop. Use range function as follows range(70, 120, 5)

Problem 2:

The FizzBuzz game: Write a Python program which iterates the integers from 1 to 50. For multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz" instead of the number. For numbers which are multiples of both three and five print "Bazinga".

You can use either While or For loops.

Sample Output :

1

2

Fizz

4

Buzz

Fizz

7

8

Fizz

Buzz

11

Fizz

13

14

Bazinga

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions