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
Rudik [331]
2 years ago
6

write a program that asks the user to enter a positive integer, then prints a list of all positive integers that divide that num

ber evenly, including itself and 1, in ascending order. when you run your program, it should match the following format: please enter a positive integer: 12 the factors of 12 are: 1 2 3 4 6 12 the file must be named: factors.py
Computers and Technology
1 answer:
Stolb23 [73]2 years ago
3 0

Answer:

<em>The program is written using python</em>

<em>See explanation section for detailed explanation; as the program does not accommodate comments.</em>

<em>Program starts here</em>

num = int(input("please enter a positive integer: "))

print("The factors of",num,"are:")

for i in range(1, num + 1):

    if num % i == 0:

         print(i)

Explanation:

This line prompts the user for input

num = int(input("please enter a positive integer: "))

This line prints a string literal which states the factors of the input number

print("The factors of",num,"are:")

The next line is a for statement that iterates all positive numbers from 1 till the inputted number

for i in range(1, num + 1):

This next line checks for the factors of the user input by checking for remainders.

    if num % i == 0:

Lastly, the factors are printed

         print(i)

You might be interested in
Where could an identity theft access your personal information?
Naily [24]
They can hack into you email or your phone number thats all they need to find where you live how old you are and etc hope this helps

8 0
2 years ago
Read 2 more answers
Operating system software allows you to use your fingers, a mouse or other pointing device to select screen controls, such as bu
bagirrra123 [75]
Operating system (OS)<span> software allows you to use your fingers, a mouse or other pointing device to select screen controls, such as buttons and scroll bars or pictures, also called Resource Manager.  </span><span>Operating System manages all the Resources like Memory and Processor and all the Input output Devices, it manages all the Resources of the System. </span>
5 0
3 years ago
Read 2 more answers
Which social media post indicates your home may be unattended?
victus00 [196]

Answer: A

Explanation:

It clearly shows your out

8 0
3 years ago
National ISPs usually offer fewer services and have a smaller technical support staff than regional ISPs.
choli [55]

Answer:

um not sure

Explanation:

5 0
2 years ago
Any fact or set of facts, such as the words in a letter to a friend or the notes in a song, can become computer ____.
Alina [70]

I think the answer is... data

3 0
3 years ago
Other questions:
  • The system administrator in your office quits unexpectedly in the middle of the day. It's quickly apparent that he changed the s
    10·1 answer
  • A bus topology network is most often deployed as a peer-to-peer network. <br> a. True <br> b. False
    7·1 answer
  • Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guz
    15·1 answer
  • What are finger nails made of?-
    12·2 answers
  • A user is trying to delete a file located on an ntfs volume on his windows 8 computer but is unable to do so. Why is this.
    5·1 answer
  • Primary technology skills are skills that are necessary for success in online education
    9·2 answers
  • Write any four difference between email and effects​
    14·1 answer
  • What is a photographic print made from a negative image?
    7·1 answer
  • How to fix a blue screen
    9·2 answers
  • How do we ensure that future technologies are fair to society?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!