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
ollegr [7]
4 years ago
15

For this question you should write code using the tools you learned so far. The code will find all the integers in the interval

from 1 to 12000 that are divisible by both 3 and 14. Print all the numbers that satisfy this criterion and also print a statement saying how many such number exist in the range. Hint: The "modulo" operator is denoted by a percent sign % in Python. It returns the remainder when two integers are divided. For example, 5%2 (read: "5 mod 2") returns a value of 1, because 5 divided by 2 is 2 with the remainder 1. The result of a modulo x%d is always between 0 and d-1. Use the modulo operator to help determine if one integer is divisible by another. Second Hint: Remember the logical operators and, or and not are available in Python.
Computers and Technology
1 answer:
kvasek [131]4 years ago
8 0

Answer:

The code in Python 3.7 than answers this question is given below:

def main():

 cont = 0

 for i in range(1, 12001):

   if i%3 == 0 and i%14 == 0:

     print(i)

     cont += 1

 print("{} numbers are divisible by 3 and 14".format(cont))

if __name__== "__main__":

 main()

Explanation:

#Create the main function, inside this is our logic to solve the problem

def main():  

#Define a cont variable that storage the amount of numbers that satisfy the condition given

 cont = 0  

 #For loop between 1 and 12000

 for i in range(1, 12001):

   #Use the mod function to know if is divisible by 3 and by 14

   if i%3 == 0 and i%14 == 0:

     #Print the number that satisfy the condition

     print(i)    

     #Refresh the cont variable if the condition is satisfied

     cont += 1

     #Print the output  

  print("{} numbers are divisible by 3 and 14".format(cont))

if __name__== "__main__":  

 #Run the main function

 main()  

 

You might be interested in
Over the past year alone, more than _________ have been stolen from Target.
jasenka [17]
40 million (google said so)
6 0
3 years ago
Read 2 more answers
All cells in row 2 through 5 are referred as 2:5 true or false
Simora [160]
<h3>Answer:</h3><h2>TRUE</h2>

Explanation:

BRAINLIEST PLSSSSSSSSSSSSSSSSSSS

8 0
3 years ago
I will give brainliest to the first person who can answer correctly.
Mariulka [41]
I think that the answer wiloukd be B. For #31 and for #32 A.
4 0
3 years ago
Which of the following is a group of computer systems and computing hardware devices linked together through various communicati
Art [367]
Digital network, as it refers to the series of connected and linked computing devices into a network as described in this question.
6 0
2 years ago
4. Give name=
Svet_ta [14]

Answer:

What does Bob [1] return?

What about Bob[-2]?

What about Bob[1:-1]?

How to get the length of Bob?​

Explanation:

8 0
3 years ago
Other questions:
  • Ben assembled parts of a computer and created a fully functional desktop PC. He wants the computer to connect to the Internet. W
    10·1 answer
  • You are preparing to program a replacement system board, but the "system is booting in mpm mode" message is not displayed. what
    10·2 answers
  • ____ are the computers that store network software and shared or private user files.
    6·1 answer
  • 2 Manter o autocontrole nos ajuda a evitar muitos problemas na nossa vida pessoal e no ambiente profissional. Em se tratando de
    14·1 answer
  • Which of the following is a valid HTML reference to a CSS file?
    13·1 answer
  • ________________, _______________ and ___________ are what you see when you open Excel
    15·1 answer
  • Which Backstage view feature helps you to specifically remove customized information from a document? Protect Document Feedback
    14·1 answer
  • Why When I change my pfp It be blurry and it be ugly- if you know what I mean :c
    15·2 answers
  • Ethan wants to change the font in his document. He should _____.
    8·1 answer
  • RUNTIME ORGANIZATION AND DATA LAYOUT.​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!