Hi, I am in my first semester of programming and I am sort of confused on how to do one of my assignments. My teacher is pretty picky on the way that our programs are written and will straight up give you a 0 if it is not correct. I know that for this assignment he mainly wants us to use the for and range functions but all the examples he gave us are dealing with only numbers. I am an example based learner and it is difficult for me to write a program simply off of definitions. If someone could help me with this I would be so grateful. And also, feel free to explain your reasoning for the way you choose to write it. I am not trying to cheat I am trying to learn!

I am glad that you were to come up with a solution but it would be more helpful if instead you helped @emmak with how to arrive to the solution on their own.

I have edited your post to include the spoiler tags.

As youâ€™ve not provided the input data type(list, tuple, dictionaries), I think I couldnâ€™t help you with thisâ€¦
Following links might help you to transverse through the list in pythonâ€¦
You can always ask here, if you face any problem

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if youâ€™re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess Iâ€™d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at https://www.freecodecamp.org/learn.

With your current questions, we donâ€™t have enough context to know what you already know or donâ€™t know, so it is impossible to guide you without just telling you the answer (which we wonâ€™t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what youâ€™ve tried and Iâ€™m sure youâ€™ll get more help.