Mastery16

Use of “else” with a conditional

Using an else in python is very similar to using an if.

Continuing with the program created in Mastery15, If the condition is not true in the if, python will jump to the else. to write and else just put “else :” and then (after leaving a space) write what you want the program to do.Mastery16

Mastery16

CC BY 4.0 Mastery16 by Pacok27 is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.