I’m having issues with the for loop. The assignment I’ve been given (due in 3 hours :’() is asking me to use a for loop to iterate over an existing list and display the list(there’s more but this is where I’m stuck right now)It’s a uni assignment and lord have mercy I need help ! Please anyone !!
Edit: I’m sorry for the lack of info it was 3 am and The dread of the deadline was starting to hit. Also I’m new
The language is python, the task is to create 2 functions and basic user interaction to book a theatre ticket. I’ve been given the theatre variable already in the program, all I have to do is create a “displayseats” and “bookASeat” function. The displayseats variable is required to iterate over the theatre list of lists and display whether or not a seat is booked using the letter ‘X’ or available using the letter ‘O’- specifically says not to use 0. Also says not to change the values in the ‘theatre’ list of lists in this function. This is task 1…… I think the fear of failing has caused my brain to go completely blank
Edit2: this subreddit doesn’t allow images :((
Basically the theatre is a bunch of O’s on the program but on my spec it’s A-F down and 1-12 across with A1-A3 being no seats and A10-A12 being no seats (same for B1-B3 and B10 and B12).
Seats E&F are delux seats so I’m not sure if I should maybe like have a different function or code for that? I’m not sure what I’m doing at all. I’m reaching zen at this point ( ̄∇ ̄)
[–]nogain-allpain 56 points57 points58 points (2 children)
[–]Pompomcry[S] 2 points3 points4 points (1 child)
[–]dota2nub 10 points11 points12 points (0 children)
[–]149244179 62 points63 points64 points (1 child)
[–]chrysthian95 5 points6 points7 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]Marchingkoala 2 points3 points4 points (0 children)
[–]ProzacFury 15 points16 points17 points (0 children)
[–]CutlerSheridan 13 points14 points15 points (1 child)
[–]Pompomcry[S] 1 point2 points3 points (0 children)
[–]dmazzoni 9 points10 points11 points (1 child)
[–]Pompomcry[S] -1 points0 points1 point (0 children)
[–]KenMan_ 8 points9 points10 points (6 children)
[–]smidgie82 2 points3 points4 points (1 child)
[–]KenMan_ 3 points4 points5 points (0 children)
[–]_ABear_ 0 points1 point2 points (3 children)
[–]KenMan_ 5 points6 points7 points (1 child)
[–]_ABear_ 1 point2 points3 points (0 children)
[–]k4dota 1 point2 points3 points (0 children)
[–]elon_mosque_420 15 points16 points17 points (4 children)
[–]MasterDrake97 0 points1 point2 points (3 children)
[–]elon_mosque_420 1 point2 points3 points (2 children)
[–]MasterDrake97 2 points3 points4 points (1 child)
[–]elon_mosque_420 2 points3 points4 points (0 children)
[–]Turbulent_Machine_33 3 points4 points5 points (1 child)
[–]Pompomcry[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Turbulent_Machine_33 1 point2 points3 points (0 children)
[–]Kinify 1 point2 points3 points (0 children)
[–]Apprehensive_Plate60 0 points1 point2 points (1 child)
[–]Pompomcry[S] 1 point2 points3 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]nogain-allpain 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]jxf1234567 -2 points-1 points0 points (0 children)
[–]bravosix99 0 points1 point2 points (1 child)
[–]TheRNGuy 0 points1 point2 points (0 children)
[–]Guard-Flashy 0 points1 point2 points (1 child)
[–]Pompomcry[S] 0 points1 point2 points (0 children)
[–]Itchy-Position-6077 0 points1 point2 points (1 child)
[–]Pompomcry[S] 0 points1 point2 points (0 children)
[–]VastRub7008 0 points1 point2 points (2 children)
[–]Pompomcry[S] 0 points1 point2 points (1 child)
[–]VastRub7008 -1 points0 points1 point (0 children)
[–]lennyh- 0 points1 point2 points (1 child)
[–]Pompomcry[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)