FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
programmingWithPythonCode/syntax/while_loop_else.py at main · thomasWeise/programmingWithPythonCode · GitHub
thomasWeise
programmingWithPythonCode
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
programmingWithPythonCode
/
syntax
/
while_loop_else.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (12 loc) · 538 Bytes
Breadcrumbs
programmingWithPythonCode
/
syntax
/
while_loop_else.py
Copy path
File metadata and controls
14 lines (12 loc) · 538 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""The syntax of a while-loop with else statement in Python."""
while
booleanExpression
:
loop
body
statement
1
# The loop body is executed as long as the
loop
body
statement
2
# booleanExpression evaluates to True.
# ...
else
:
else
statement
1
# The body of the 'else' block is only executed if
else
statement
2
# 'break' was never invoked in the while loop.
# ...
normal
statement
1
# After booleanExpression became False, the while
normal
statement
2
# loop ends and the code after it is executed.
# ...
Back
|
FazBrowse Home
|
New Git URL