![Python-courses-python-exercises-python-sets-python-inheritance](https://1.bp.blogspot.com/-T3BongcoJFo/X4CftQxVL8I/AAAAAAAAB5U/Lf59WgNyhGo2FdogKqxv0PIy_Ef7XDPdgCLcBGAsYHQ/s0/my-python-courses-python-exercises-with-solutions.png)
Exercise 4
Write a program in Python that asks the user to enter 5 integers of their choice and display the list of numbers entered.
Solution
# initializing the list of numbers to enter
listNumbers = []
for i in range (0 , 5):
n = int (input ("Type the value of an integer:"))
# add the number n to the list
listNumbers.append (n)
# Display the list of entered numbers:
print ("Here is the list of entered numbers:", listNumbers)
Younes Derfoufi
my-courses.net
my-courses.net