r/pythonhelp • • Jun 15 '24

which lines have errors?

can you guys help me figure out which lines have errors?

  1. def make_list (number) :

  2. names = \[\]
    
  3. for item in number :

4 names.append (input(“Enter your name with a capital letter.”))

  1. print(names)

6.

7 number = int(input(“How many names need to be entered? ”))

  1. names = make_list(number)

  2. for name in names:

  3.  if name \[1\] ==“A”:
    
  4.       print(“Name”, name, “starts with A”)
    
1 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/thisnigerianmomma Jun 19 '24

yes i did. i read your comment. thank you. it is for a coding test, so I also ticked the lines you mentioned (2, 3, 5 and 10) but it's still not correct.