In case you haven't figured it out, you need to add [x] to the array callout where it is used in setup() and loop().
pinMode(ledPins[i], OUTPUT);
digitalWrite(ledPins[i], HIGH);
Probably need to this to setup() as well:
pinMode (7, INPUT_PULLUP);
to enable the pullup resistor on the pin, then use a button to connect the pin to Gnd when it is pressed.
Against each line write comments containing what you understand now and then post again. Then we can help with any lines you might have difficulty with.
If you really don't understand any of it then you are not going to pass IT and you should not pass.
Normally, when someone is up-front that they are asking a school related question, I am willing to offer guidance. But, I won't do the work for anyone who makes it obvious that they haven't performed even the slightest bit of reading or research into the subject. Do you even have the Arduino IDE installed? Do you even have an Arduino board?
You can easily read up what each of these lines does - if someone here does that for you , you will be back next year with further questions when you next get asked about a code.
You need to learn the basics of coding , and how to research it to get answers . Not being mean , this really is for your benefit.
The object of being asked the question by the course is that by answering it you have gained the knowledge , by asking someone else to do it , then you are not proving you have learnt anything.
Top marks for fessing up it’s for school work tho .
Seriously though, if at the end of the year you can't explain a single line of that code, please don't apply for any jobs in my IT department. If you do understand at least some of that code, and are motivated/interested enough to post it here, I (and many others here) will be happy to tell you what may be wrong and/or give you tips on what would be right.