Code Portfolio Example#
READ THIS: You are expected to create at least one item per class period (roughly days 1-12 for the checkpoint and days 1-24 for the final assignment). How the items are structured is up to you (markdown, code, images, etc.), but they need to be noted by the class day (see the example below for reference). You will need to turn this in via CodeGrade for grading. If you have any questions, please reach out to your section instructor!
EXAMPLE#
Day 3#
Looping by Index#
The code below loops by index over the value of x and adds 4 to all of the values.
When I use this code, I need to change:
range(len(x))(specifically, the valuex) to whatever we are looping over.x[gg] = x[gg]+4To whatever procedure we want the loop to be repeating.
x = [4,12,16,22,33,49]
for gg in range(len(x)):
x[gg] = x[gg]+4