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
Create and apply a CSS class named YellowBackground that selects a yellow background. Apply the class to your HTML file’s body t
RSB [31]

<!DOCTYPE html>

<html>

<head>

 <title>Page Title</title>

</head>

<body class="YellowBackground">

 <style>

    .YellowBackground {

        background-color:yellow;

    }

</style>

</body>

</html>


Like this?

7 0
3 years ago
To increase usability, take care to place important content, such as logos, names, CTAs, and major links, ______ of potential sc
tangare [24]

Answer:

b. above and to the left

Explanation:

To increase usability, take care to place important content, such as logos, names, CTAs, and major links, above and to the left of potential scroll lines.

6 0
3 years ago
3. Run the C-LOOK algorithm (requests can only be serviced when the head is moving toward higher numbered tracks); the head is c
o-na [289]

Answer:

See explaination.

Explanation:

An algorithm is specifically defined as the step by step method or process of achieving any type of result.

Please kindly see the attached file for the C algorithm that fulfils the answer of the given problem.

3 0
3 years ago
The methodology used by web project teams is usually:
Tamiku [17]
The SDLC would be the usually used methodology by web project teams. Also known as the systems development life cycle, this kind of application development process is primarily used in information, computer, and software engineering which involves planning and testing applications.
5 0
3 years ago
Joshua Lee, an engineer at Footprints Inc., is provided with a design by the creative team in his company for creating a softwar
tamaranim1 [39]

Answer:

Development & implementation phase

Explanation:

There are mainly six stages of SDLC, which are as follows:

1. Planning: Planning is the first step in app development, where the developer preplans every aspect of the software.

2. Analysis: After planning, the developer analyzes further requirements to develop the software as per planning.

3. Design: After planning and analysis, the developer makes the design which is the main architecture of the software.

4. Development & implementation: When the developer completes the design, the development phase comes in where the data is coded and recorded as per requirement and after development, implementation takes place to see if software functions properly or not.

5. Testing: Testing mainly tests the programs to check for any errors or bugs.  

6. Maintenance: When the software is developed successfully, then time to time maintenance and updation of the software takes place to maintain and upgrade its working.

Hence according to the scenario, development & implementation phase is the right answer.

7 0
3 years ago
Other questions:
  • What human activity would cause a decrease in the population of another species? (The action of humans would impact one species,
    9·1 answer
  • "Suppose that instead of always selecting the first activity to finish, we instead select the last activity to start that is com
    14·1 answer
  • What doe the &amp; operator do in python programming software
    9·1 answer
  • Microsoft word's spell checker
    7·2 answers
  • Which of the following is true regarding packaged software and custom software? Group of answer choices Packaged software are ap
    13·1 answer
  • How does technology make America great?​
    10·1 answer
  • (15) What is the best definition of a contextual tab?
    8·1 answer
  • Font size, font style, and _______ are all aspects of character formatting.
    14·2 answers
  • What is bug in computer?​
    12·1 answer
  • Giving brainliest to the Person finishes this song lyric.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!