The Basics (if Else Statements) - Deepstash
The Basics (if Else Statements)

The Basics (if Else Statements)

if else statements are also very important. To use a if else statement use this function if score == 4:

print(“your score is good”)

else:

print(“ your score is excellent”)

Anything after the else or if statement on the next should be indented to be apart of the statement(s). Your statement can equal a number, text, of a Boolean.

To replace the double equals sign

== Exactly equal

!= Not equal

> Greater than

< Less than

>= Greater than equal to

1

1 read

CURATED FROM

IDEAS CURATED BY

fluffy705

I am a student wanting to know more about the world

Remember even I cover Python 3.10 all version of Python are case-sensitive so type the functions word for word. If you don’t understand something in this tutorial search it up on the web. Comment and like. Follow for more coding tips and tricks!

Similar ideas to The Basics (if Else Statements)

Learning Python: IF statements

Learning Python: IF statements

As you can see in the image, we are working with conditional if statements. This is used to find out if something is True or False. As you can see i used '

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates