Common Computer Science References
At the end of this lesson, you will be able to:
understand and use a for loop
do ... while loop statement
go over For Loops , Computer Based Problem Solving
see these examples
for num in range(10, 20): #to iterate between 10 to 19
pass
for num2 in range(10): #to iterate on the number 0 to 9
pass
create a program that accepts a positive integer (only positive!); it then calculates the square (power of 2) of each integer from 0 to this number:
ex: enter 3
0² = 0
1² = 1
2² = 4
3² = 9
recreate the same above program in C
NOTE: You can turn on "Closed Captions" to see a printout of what is being said by selecting the "CC" button.
You can also have it translate the closed captions by going to "Settings, Subtitles/CC, Auto-translate" and then pick your prefered language.