Home > other >  Rookie help code where there is a problem?
Rookie help code where there is a problem?

Time:10-29

Requested_toppings=[' mushrooms', 'green peppers' and' extra cheese ']

For requested_topping requested_toppings in:
If requested_topping=='green peppers' :
Print (" Sorry, we are out of green peppers right now. ")
The else:
Print (f "Adding {requested_topping}.")

Print (" \ nFinished making your pizza!" )
Where is this wrong???????


An error is as follows:


[Decode error - the output not utf-8]
The else:
^
IndentationError: unindent does not match any outer indentation level
[Finished in 0.1 s with exit code 1)

CodePudding user response:

If want to indent, print the indentation

CodePudding user response:

Look not to come out so obvious errors, the error message all write very clear,
The following that the else should be aligned with the above that the if
Also is the indent your grammar mistakes,

CodePudding user response:

The indentation problem, appear in the else
Else to be aligned with the if
  • Related