Professional Documents
Culture Documents
Scenario:
Using a list and For loop, write a Python program that asks a user to enter a city 3 times and displays
the list of cities.
Instructions Points
1 Create an empty list 1
2 Use For loop (counter = 3) 2
3 Ask the user to enter a city 1
4 Add the city to the list 2
5 Display the list 1
Total 7
Expected output:
Enter a city: Jeddah
Enter a city: Makkah
Enter a city: Riyadh
The list is: ['Jeddah', 'Makkah', 'Riyadh']
Requirements:
1. Download the assignment document.
2. Copy and paste the Python code into the assignment document.
3. Provide a screenshot for the console screen in the assignment document.
4. Submit the assignment document.
Page 1 of 2
King Abdulaziz University
The Applied College
Page 2 of 2