Answer to Question #309719 in Python for kyle

Question #309719
  1. Print out all numbers from 1 to 100 that is divisible by 3 using a for loop just like the last problem, but this time, with each number only separated by the space like that of the sample output.
1
Expert's answer
2022-03-11T02:26:21-0500
def main():
    for number in range(1, 101):
        if number % 3 == 0:
            print(number, end=" ")


if __name__ == "__main__":
    main()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS