94.0k views
2 votes
Does anyone know the answer to 4.3 Code Practice: Question 2 for writing a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21 in edhesive?

User Tam Borine
by
4.7k points

1 Answer

3 votes

In python:

i = 3

while i <= 21:

if i % 3 == 0:

print(i)

i += 1

I hope this helps!

User Kristof
by
5.2k points