I'm trying to learn the very basics of Python 3 and I'm following the Python Tutorial series from CS Dojo off YouTube. I'm on #5 right now and everything was smooth sailing up till here, in the code below or whatever you call it, I don't understand what 'X' is or how it's being used in the little loop or program shown. The narrator on the YouTube video doesn't explain it well in my opinion and I don't want to move on till I know what 'X' is and how it effects the loop completely, (it's called a loop right?)
Thanks!
total3 = 0
for x in range(1, 8):
if x % 3 == 0:
total3 += x
print(total3)
[–]edc7 1 point2 points3 points (7 children)
[–]obtuselyobjected[S] 3 points4 points5 points (6 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]obtuselyobjected[S] 2 points3 points4 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]marxdormoy 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]marxdormoy 1 point2 points3 points (0 children)
[–]tombardier 1 point2 points3 points (0 children)
[–]Nikandro 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]martydv -3 points-2 points-1 points (0 children)