0% found this document useful (0 votes)
2 views1 page

Python Loops Assignment

The document contains three Python programming assignments. The first task is to create a multiplication table using a for loop, the second is to implement a password prompt using a while loop, and the third requires printing numbers from 1 to 30 while skipping those divisible by 3 and stopping at 25. Each task emphasizes different looping constructs in Python.

Uploaded by

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

Python Loops Assignment

The document contains three Python programming assignments. The first task is to create a multiplication table using a for loop, the second is to implement a password prompt using a while loop, and the third requires printing numbers from 1 to 30 while skipping those divisible by 3 and stopping at 25. Each task emphasizes different looping constructs in Python.

Uploaded by

rida.maryam1215
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Assignment: Python Loops

Q1. Write a Python program using a for loop and range() to print the multiplication table of a
number entered by the user (from 1 to 10).
Q2. Write a Python program using a while loop that repeatedly asks the user to enter a password
until the correct password ('python123') is entered.
Q3. Write a Python program that prints numbers from 1 to 30 using a for loop. Skip numbers
divisible by 3 using continue and stop the loop when the number reaches 25 using break.

You might also like