File: Tutorial_04_list.py

package info (click to toggle)
sugar-pippy-activity 76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,664 kB
  • sloc: python: 5,860; makefile: 16; sh: 1
file content (11 lines) | stat: -rw-r--r-- 211 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
my_list = []

num = 1

while(num < 5):
    data = eval(input("Please enter number " + str(num) + ":"))
    my_list.append(int(data))
    num = num + 1

print("You entered the following numbers:")
print(my_list)