1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kamila [148]
3 years ago
11

g Write a program that prompts the user to enter two integers. The program outputs how many numbers are multiples of 3 and how m

any numbers are multiples of 5 between the two integers (inclusive).
Computers and Technology
1 answer:
finlep [7]3 years ago
3 0

Answer:

number1=int(input("Enter first smallest integer number: "))#take the first integer from the user.

number2=int(input("Enter the second greatest integer number: "))#Take th esecond integer from the user.

if(number1>number2):#if condition

   print("The number is wrong, please try again")

else:

   multiple_of_3=0 #take a variable to count the multiple of 3.

   multiple_of_5=0 #take a variable to count the multiple of 5.

   while(number1<=number2):#while loop.

       if(number1%3==0):#if condition to count the multiple of 3.

           multiple_of_3=multiple_of_3+1#operation to count the multiple of 3.

       if(number1%5==0):#if condition to count the multiple of 3.

           multiple_of_5=multiple_of_5+1#operation to count the multiple of 3.

       number1=number1+1

   print("There are "+str(multiple_of_3)+" number are multiple of 3 and "+str(multiple_of_5)+" are multiple of 5")#print the count.

Output:

  • If the user gives the input 1 and 15, then it will print 5 for 3 multiple and 3 for 5 multiple.
  • If the user gives the input as 7 and 15, then it will print 3 for a multiple of 3 and 2 for a multiple of 5.

Explanation:

  • The above code is in python language, which is used to count the number of 3 multiple and 5 multiple.
  • There is a while loop that runs from the smallest number to greatest number and the check the number that it is a multiple of 5 and 3 or not by the help of if condition.
  • If it is multiple of 3, then multiple_of_3 variable is incremented by 1 and if it is a multiple of 5 then the multiple_of_5 is incremented by 1.
You might be interested in
If you need to add more data between column A and column B, you should _____. click in column A and paste a column click anywher
Luda [366]

Answer:

Use the insert column command by placing your cursor between A and B. Then insert your data

Explanation:

3 0
3 years ago
Quiero saber que tipo de gama es mi laptop (gama baja, media, o alta)
nalin [4]

Answer:

I think the answer would be 60x something but I'm not for sure

8 0
2 years ago
What does the CMYK tab let you do
Paha777 [63]

<span>CMYK means cyan, magenta, yellow, and key (black). They are the four color model used in color printing or printing color images. It lets you subtract the colors on the image. CMYK partially or fully masks colors on a lighter view. </span>

3 0
3 years ago
Read 2 more answers
Load the we8there data set from the textir package. List the first 5 restaurants’ ratings from we8thereRatings. Based on we8ther
Readme [11.4K]

Answer:

> we8thereRatings[1:5,]

  Food Service Value Atmosphere Overall

1     5       5     5          5       5

2     5       5     5          5       5

5     5       5     4          4       5

11    5       5     5          5       5

12    5       5     5          4       5

3 0
3 years ago
ZigBee is an 802.15.4 specification intended to be simpler to implement, and to operate at lower data rates over unlicensed freq
never [62]

Answer:

True

Explanation:

Solution

ZigBee uses unlicensed frequency bands but operate at slower speed or data rates.

ZigBee: This communication is particular designed for control and sensor networks on IEEE 802.15.4 requirement for wireless personal area networks (WPANs), and it is a outcome from Zigbee alliance.

This communication level defines physical and  (MAC) which is refereed to as the Media Access Control layers to manage many devices at low-data rates.

6 0
3 years ago
Other questions:
  • What substance was the first photograph made from?
    6·1 answer
  • What kind of testing is basically checking whether a game or feature works as expected by the developers?
    10·1 answer
  • What is one example of technology influencing health​
    9·1 answer
  • HI GIVING BRAINLIEST Tyra used the software development life cycle to create a new game. She released it to her friends in order
    14·2 answers
  • How did the invention of the printing press lead eventually to an increase in the diversity of religious expression?
    7·1 answer
  • Many mobile devices can perform Internet searches and other tasks via
    8·1 answer
  • E-mail has made it very easy to send a message to more than one person at any time of day from just about anywhere. If you wante
    7·1 answer
  • Can anybody do Algorithm 2 for me (with Python).<br> Answer = 25 points.
    13·1 answer
  • c++ 4.17 LAB: Count characters Write a program whose input is a character and a string, and whose output indicates the number of
    14·1 answer
  • I have a problem. I can't cycle between game packs on my strike pack, I've watched so many vids I'm on Xböx and I'm holding the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!