Question

Use Python3 Write a program that prints the numbers from 1 up to 105 (inclusive), one...

Use Python3

Write a program that prints the numbers from 1 up to 105 (inclusive), one per line. However, there are three special cases where instead of printing the number, you print a message instead:

1. If the number you would print is divisible by 3, print the message: The dog of wisdom knows all about this number.

2. If the number you would print is divisible by 7, print the message: Hold on I have a meme for this.

3. If the number you would print is divisible by 3 and 7, instead print out: Some infinities are bigger than other infinities! Print the exact strings given! Failing to do so will lose you points.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//note:- if you have any query regarding this then comment below. please upvote


for i in range(1,106):
    if i%3==0 and i% 7==0:
        print(i)
    elif i%3==0:
        print("The dog of wisdom knows all about this number.")
    elif i%7==0:
        print("Hold on I have a meme for this.")

for i in range (1,106): print(i) print (The dog of wisdom knows all about this number. print (Hold on I have a meme for this.) for i in range(.. divid C:NUsers\rishiraj AppData\Local\Programs\ Python\ Python37\python.e The dog of wisdom knows all about this number The dog of wisdom knows all about this number Hold on I have a meme for this. The dog of wisdom knows all about this number The dog of wisdom knows all about this number Hold on I have a meme for this. The dog of wisdom knows all about this numbe:r The dog of wisdom knows all about this number 21 The dog of wisdom knows all about this number The dog of wisdom knows all about this numbe:r Hold on I have a meme for The dog of wisdom knows all about this number The dog of wisdom knows all about this number Hold on I have a meme for this. The dog of wisdom knows all about this number The dog of wisdom knows all about this number area of pentagone this

Add a comment
Know the answer?
Add Answer to:
Use Python3 Write a program that prints the numbers from 1 up to 105 (inclusive), one...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT