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
  • Write a complete program that prints numbers from 1 to 50, but if numbers that are...

    Write a complete program that prints numbers from 1 to 50, but if numbers that are multiples of 5, print HiFive, else if numbers that are divisible by 2, print HiTwo, and else if numbers that are divisible by 3 or 7, print HiThreeorSeven *Please in python*

  • Write a C program that prints the numbers from 1 to 100, but substitutes the word...

    Write a C program that prints the numbers from 1 to 100, but substitutes the word “fizz” if the number is evenly divisble by 3, and “buzz” if the number is divisible by 5, and if divisible by both prints “fizz buzz” like this: 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizz buzz 16 17 fizz 19 buzz ... and so on

  • Write a program that prints the numbers from 1 to 100. But for multiples of three...

    Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. Hints: You can use a for loop with a range to simplify the iteration Use the modulo division operator (%) to find the remainder of a division calculation

  • (Done in Eclipse Java) 1. Given an integer between 1—100 captured from a user, perform the...

    (Done in Eclipse Java) 1. Given an integer between 1—100 captured from a user, perform the following conditional actions: • If is odd, print Weird • If is even and in the inclusive range of 2 to 5, print Not Weird • If is even and in the inclusive range of 6 to 20, print Weird • If is even and greater than 20, print Not Weird Note: Validate that your algorithm works for all cases. 2. Read an integer...

  • write a java program that does the following Part one Use a For loop to compute...

    write a java program that does the following Part one Use a For loop to compute the sum of all the odd numbers from 1 through 99. Your result should be labeled, and the value should be 2500. Print your name 7 times using a While loop. String dogNames[ ] = {"Sam","Buster","Fido","Patches","Gromit","Flicka"}; Using the array defined here, print the values of the array vertically and horizontally using one For-Each loop. Reverse the logic (Nested loops: Indent text) so that the...

  • Write a C or C++ program A6p2.c[pp] that accepts one command line argument which is an integer n between 2 and 4 inclusive. Generate 60 random integers between 1 and 39 inclusive and store them in a 5 by 12 two dimensional integer array (e.g.,int a[5][12]

    1.      Write a C or C++ program A6p2.c[pp] that accepts one command line argument which is an integer n between 2 and 4 inclusive. Generate 60 random integers between 1 and 39 inclusive and store them in a 5 by 12 two dimensional integer array (e.g.,int a[5][12];). Use pthread to create n threads to convert all 60 array elements modulo 11 (i.e. take the remainder after division by 11) in place. You should divide this update task among the n threads as evenly as possible. Print the array both before and after...

  • Your program must meet the following specifications: 1. At program start, assume a stock of 10 nickels, 10 dimes, 10...

    Your program must meet the following specifications: 1. At program start, assume a stock of 10 nickels, 10 dimes, 10 quarters, and 10 pennies. 2. Repeatedly prompt the user for a price in the form xX.xx, where X denotes a digit, or to enter q' to quit 3. When a price is entered a. If the price entered is negative, print an error message and start over requesting either a new price or to quit (indicated by entering a 'q)...

  • Tasks Write a program that prints in text mode Project 2 written by YOURNAME And shows...

    Tasks Write a program that prints in text mode Project 2 written by YOURNAME And shows in a graphical way, as shown below, the names stored in a file. The coordinates to print the names will be also read from another file. Here is an example of what your graphic output should look like with the two files that are provided for test purposes. Drawing Panel Adam Bernie Cameron Daniel Fanny Gerard Harold Issac Jackie Raitlyn Note that the colors...

  • hello. i need help with number 2 ONLY 1. Use if statements to write a Java...

    hello. i need help with number 2 ONLY 1. Use if statements to write a Java program that inputs a single letter and prints out the corresponding digit on the telephone. The letters and digits on a telephone are grouped this way 2=ABC 3 = DEF 4 GHI 5 JKL 6 - MNO 7 - PRS 8 - TUV 9-WXY No digit corresponds to either Qor Z. For these 2 letters your program should print a message indicating that they...

  • USE JAVA PLEASE And answer all questions Question 5.1 1. Write a program that reads in...

    USE JAVA PLEASE And answer all questions Question 5.1 1. Write a program that reads in a number n and then reads n strings. it then reads a string s from the user and gives you the word that was typed in after s. Example input: 4 Joe Steve John Mike Steve Example output: John Example input: 7 Up Down Left Right North South East Right Example output: North 2. Remember to call your class Program Question 5.2 1. Write...

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