Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python please I need help fixing my code so this online textbook will accept my answer. This is my current code and below it is

Python please

I need help fixing my code so this online textbook will accept my answer. This is my current code and below it is the question being asked.

image text in transcribed

image text in transcribed

This is the error message I receive.

Your output: The weather forecast is clear view.

Test feedback: status("blue","steady") incorrectly returned The weather forecast is clear view.

What am I doing wrong?? How should I fix my current code?

def status(color, mode): if color --'blue and mode teady ans = 'The weather forecast is clear view print(ans) elif color'blue' and modeflashing": ans- 'The weather forecast isclouds due. print(ans) elif colorred' and mode steady ans = 'The Weather forecast is rain ahead.' print(ans) elif color'red' and mode flashing: ans = 'The weather forecast is snow instead.' print(ans) return ans --name main..': color - input("Enter a color(BLUE or RED): ") printO color = color. upper? print(color) mode - input("Enter amode (STEADY or FLASHING):" printO mode -mode.upperC print(mode)

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