Homework:
Write a while loop with these conditions:
Variable num starts at 0
Increments by 3 for a multiple of 2
Increments by 5 for a multiple of 3
Increments by 7 for a multiple of 5
Else, increment by 1
(For numbers like 30, a multiple of 2, 3, and 5, just let it increment thrice.)
num ends at 50
Write a for loop that reverses a string.
Write a while loop that prints all numbers from 1 to 50 except multiples of 4.
Resources: Class slides: https://docs.google.com/presentation/d/12rWL4PsRGKQ8NNUjlfhZL2R8WsSt6vfex4KB7vGWAJI/edit#slide=id.g15d5b893d3d_0_140
Class code: https://replit.com/@ShravyaS/IntrotoPython-Class4#main.py Contact info: shravyassathish@gmail.com (mentor) kingericwu@gmail.com (TA) felixguo41@gmail.com (TA)
1. num = 0
while(num < 50):
if num%2 == 0:
num = num+ 3
if num%3 == 0:
num= num+ 5
if num%5 == 0:
num=num+7
else:
num=num+ 1
print(num)
2.idk
3.num = 0
while (num <= 50):
if num % 4 == 0:
continue
num = num + 1
print(num)