Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    Write a program to store data about DVDs that are for sale. It should start by asking the user to enter five film titles using a loop. The program should then print out the list of film titles so the user can check it is right.
    Offline

    1
    ReputationRep:
    (Original post by programer noob)
    Write a program to store data about DVDs that are for sale. It should start by asking the user to enter five film titles using a loop. The program should then print out the list of film titles so the user can check it is right.
    Store in what? Memory, array, file?
    Code:
    films = [] 
    for a in range(5): 
    print("Please input a title") 
        title = input() 
    films.append(title) 
    
    for b in range(len(films)): 
        print(films[b])
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Has a teacher ever helped you cheat?
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Write a reply...
    Reply
    Hide
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.