OK, So far I only know C# and I have started learning python. To learn C# I made a cinema program which shows a list of films and lets the user pick and enter their age to see if they are old enough. Trying to do the same with python.
At the start, the person chooses how many films are being shown and then is allowed to enter film names for each film up to the maximum amount of films being shown. This is my attempt in python
print("Welcome to our multiplex:")
NumOfFilms = input("How many films are being shown?")
NumOfFilms = int(NumOfFilms)
FilmList = [NumOfFilms]
i = 0
while i < NumOfFilms:
FilmList[i].append = input("Enter the name of film number",i)
i = i + 1
In C# I did a similar thing, set the maximum element of an array I created equal to the NumOfFilms variable. Trying to do the same in python. The variable "i" is being used as an element placer for the list here.However whenever I run this, one of the errors I get is that "list assignment index is out of range". Can someone help me please?
There is also another problem where the function input doesn't except 2 arguments in this case a string and an integer i. But I want it to print out "Enter the name of film number 'i' " to make more sense. Can someone help me with this aswell if you get what am trying to do?