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

Python - Content - Manual (1) - 85

The document discusses loops in Python and provides questions to test knowledge of loops and if statements. It mentions increasing the counter variable, infinite loops, and downloading a Jupyter notebook on loops.

Uploaded by

CaPital
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Python - Content - Manual (1) - 85

The document discusses loops in Python and provides questions to test knowledge of loops and if statements. It mentions increasing the counter variable, infinite loops, and downloading a Jupyter notebook on loops.

Uploaded by

CaPital
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

We need to increase the value of the counter variable in the body of the loop.

This is very
important (and mostly forgotten). Failing to do so will result in an infinite loop (never ending
loop).

Finally, the result is displayed.

Let’s Practice
Let’s Go through the flow control Jupyter Notebook to get an experiential learning
experience for ‘for’ and ‘while’ loop . To download the Jupyter Notebook, go to the following
link : http://bit.ly/loops_jupyter

Note:
To open Jupyter notebook, go to start menu → open anaconda prompt → write “jupyter
notebook”

Test Your Knowledge


Q1) Explain different types of 'If' statements with the help of a flowchart.
Q2) What is the difference between 'for' loop and 'while' loop. Explain with a help of a
flowchart?
Q3) What are python nested if statements? Explain with example.
Q4) Write a program to find numbers which are divisible by 7 and multiple of 5 between 1200
and 2200.
Q5) Write a program to find the whether a number is prime or not using 'while' loop.

85

You might also like