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]
3 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]3 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
Joe has just started the Security Module. He wants to get through it as quickly as possible and take the Quiz. As he clicks thro
Scorpion4ik [409]

Answer:

Joe should read the explanatory text and complete the learning activities.

Explanation:

Given

See attachment for options

Required

Best strategy to get through the module

First off, rushing through the activities and taking guess for each question (as suggested by (a)) will not help him;

He may complete the activities but sure, he won't learn from the module.

Also, reading through the units without completing the activities is not an appropriate method because Joe will not be able to test his knowledge at the end of the module.

The best strategy to employ is to read through the units and complete the activities, afterwards (option (b)).

4 0
3 years ago
A string that contains only 0s,1s, and 2s is called a ternary string. How many strings of 10 ternary digits (0, 1, or 2) are the
alexdok [17]

Answer:

Number of strings = (10, 2)×(8,3) = 2520

Explanation:

The number of possible combinations for taking two 0's is C(10, 2)

It remains 8 Positions

The number of possible combinations for taking three 1's is C(8,3)

So there remains 5 spots

8 0
4 years ago
Read 2 more answers
Explique dos recursos que necesitan los empresarios para poder poner en práctica sus ideas.
nasty-shy [4]

ESPANOL: La explotación exitosa de nuevas ideas es crucial para que una empresa pueda mejorar sus procesos, traer productos y servicios nuevos y mejorados al mercado, aumentar su eficiencia y, lo más importante, mejorar su rentabilidad.

INGLES: The successful exploitation of new ideas is crucial to a business being able to improve its processes, bring new and improved products and services to market, increase its efficiency and, most importantly, improve its profitability

8 0
3 years ago
Read 2 more answers
You are the network administrator for a company. The company's policy is that the users are allowed to set their own passwords b
insens350 [35]

After I have changed her password, all I will need to do is select the “User must change password at next logon” option. This option will prompt her to log on to her PC using the password I assigned to her.

Explanation

An active Directory on most Domain Controllers gives you access to add users, disable accounts, change password, and various other tasks. Assuming that everything is setup, I am just going to go to my Windows Server Manager dashboard of my Domain Controller. While I am at my dashboard, I will click on tools and then drop down to the Active Directory Users and Computers to locate my desired user who seems to have been locked out.

Once the user has been identified, I will simply need to right click on the account and select “reset password”. A small dialog box with a list of cool security options will pop up. I will be required to reset it to something simple and default and make sure to select the “User must change password at next logon” option.

What this means is that the user who is locked out, upon logging back in, will be prompted to enter the password I gave them first as default but then will immediately be asked to change the password to something new. We do not see options A and B a lot in the real world. It is best practice not to select these options

Learn more about Active Directory

brainly.com/question/13615178

brainly.com/question/13591643

#LearnWithBrainly

5 0
4 years ago
To make data goes to just appropriate device we use​
Stells [14]

Answer:

To make sure that data sent from a device is just received by appropriate device we use "<u>Switch</u>"  

Explanation:

Switch is the networking device. It is used to connect all the Local area networks in a computer network. The switch store the addresses of all computers over the network. Whenever data packet arrives to the switch, it just read the address of destination computer and just send it to appropriate device instead of all devices.

Hub is also used for this purpose, but it has no ability to read the address and send the packet to all devices over the network.

<em>So, we use Switch to send data to appropriate device.</em>

8 0
3 years ago
Other questions:
  • According to Holpp and Kelly's approaches to developing vision, the benchmarking approach is more internally focused, whereas th
    6·1 answer
  • 4. The Internet may best be compared to a/an A. series of colored lights. B. loud truck motor. C. enormous skyscraper. D. large
    6·1 answer
  • Write a program that performs the following tasks: Display a friendly greeting to the user Prompt the user for the value to conv
    13·1 answer
  • The overall cost of wiring in addressable fire alarm system is significantly cheaper than the conventional one. Why is it so?
    14·1 answer
  • Could someone please help me with this?
    8·1 answer
  • A profit of ₹ 1581 is to be divided amongst three partner P,Q and R in ratio 1/3:1/2:1/5.theshareof R will be?​
    10·1 answer
  • Discuss how a lack of infrastructure in poor communities could contribute to ill-health such as the Unrest looting.​
    9·1 answer
  • What Is What is the difference between system software and application software?<br>​
    11·1 answer
  • Match each type of video camera to its features:
    15·1 answer
  • Name four successful conversions to an electronic health record system in a medical facility
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!