0% found this document useful (0 votes)
21 views

Python Lessons

This document discusses Python logical operators and how to end a while loop in Python using the break statement. It defines logical operators as those used to check if an expression is true or false. It then provides an example of using the break statement to exit a loop early when a condition is met, in this case ending the loop when the variable i equals 5.

Uploaded by

Chu Chillies
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Python Lessons

This document discusses Python logical operators and how to end a while loop in Python using the break statement. It defines logical operators as those used to check if an expression is true or false. It then provides an example of using the break statement to exit a loop early when a condition is met, in this case ending the loop when the variable i equals 5.

Uploaded by

Chu Chillies
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Python Logical Operators

Presented by Tr. Emerald K


, Python provides three Boolean operators, or
logical operators.
Python Logical Operators
True or False.

Python Logical Operators


• Logical operators are used to check whether an expression is true or false.
How to end a while loop in Pyt
hon by Tr. Emerald K
Presented
1. Break
• break word is used to exit a loop early. It terminates the loop that contains
it and redirects the program flow to the following statement.
• i=1

• While i<=10:

• print(i)

• i+=1

• If i==5:

• Print(“stop”)

• break
Title and content layout with chart
6

0
Category 1 Category 2 Category 3 Category 4

Series 1 Series 2 Series 3


Two content layout with table
• First bullet point here Class Group 1 Group 2

• Second bullet point here Class 1 82 95

• Third bullet point here Class 2 76 88

Class 3 84 90
Two content layout with SmartArt
• First bullet point here
Group
• Second bullet point here A
• Third bullet point here

Group Group Group


D
Title B

Group
C
Add a Slide Title - 1
Add a Slide Title - 2
Add a Slide Title - 3
Add a Slide Title - 4
Click icon to add picture

Add a Slide Title - 5

You might also like