Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3.) Write a function called forecast that has no parameters. You can see that barebones functions.py that we provided imports the random module. Use random.randrange

image text in transcribed

3.) Write a function called forecast that has no parameters. You can see that barebones functions.py that we provided imports the random module. Use random.randrange (101) to get an integer between 0 and 100. This is your forecasted chance of rain, which will be different every time. Print it in the following format (the code executed is in blue, the output produced is in green): forecast() Chance of rain today: 59 % forecast() Chance of rain today: 74 7 4.) Write a function called radians that takes an angle in degrees and prints it converted to radians. The formula for turning an angle in degrees into radians is: radians = degrees * / 180. Use math.pi for it. You should round the result to three decimal places using the built-in round function. The documentation is here. I suggest messing around in the shell with round to see how it works. Here are some examples of calling the function with different arguments. (The code executed is in blue, the output produced is in green): radians (200) The angle in radians is: 3.491 radians (30) The angle in radians is: 0.524 5) Write a function called decimal that bacumhar Drint the decimal art in th t 5 17

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

More Books

Students also viewed these Databases questions