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
quester [9]
3 years ago
13

Write a program that will take a user-input number and then display all of the whole # factors for that number. For example, if

I typed in 4, your program should display all # of the factors for 4 (1, 2, and 4). Your program should work for any number. # # Hint: What approach would you take if faced with this scenario? What Python operator can # be used to determine whether a number is divisible by another number?
Computers and Technology
1 answer:
klemol [59]3 years ago
4 0

Answer:

The program to this question can be given as:

Program:

Number=int(input("Insert a number :"))   # input a number from

fact=[]               # crate list

for k in range(1,Number+1):              #loop

   if Number%k==0:                      # check number is divisible by k

      fact.append(k)    

print ("Factors of {} = {}".format(Number,fact))   #print value

Output:

Enter a number: 4

Factors of 4= [1,2,4]

Explanation:

In the above python program firstly we declare a variable that is Number in this variable we take user input. To user input, we first convert the value into the integer and the input function is used for input. Then we declare a list that fact =[]. In the python, the list is used for placing all the elements inside a square bracket [ ] all the elements will be separated by commas. Then we use for loop it is used for iterate over a sequence. Then we use the if statement. It is used for check condition. In this statement, the number is divided by k. if the remainder is equal to 0. It will print the value.

You might be interested in
Explain at least 5 parts a a computer.
Stels [109]

Answer: There are many parts of a computer, but there are basic ones and major ones.

Explanation: Computers may look very different, but the components installed are standard. The major difference among most machines is the brand of hardware installed. The hardware components—video card, processor, memory, motherboard and hard drive—are the same for all computer systems. While, these are the major ones: Motherboard.

Processor/CPU.

Power Supply.

Hard Drive.

PCI-Express Cards.

Graphics Cards.

RAM/Memory.

6 0
3 years ago
Why does a HTML seen to work even when its broken? why does the code sometimes turn pink?
OverLord2011 [107]

the reason HTML seems to work even if it has syntax errors is due to browser having built in ways to parse the code meaning it will still show but most likely look way different then you would want.

the code may turn pink due to syntax errors

5 0
4 years ago
What is the difference between internet and intranet​
Elenna [48]

Answer:

The Internet is a globally-connected network of computers that enables people to share information and communicate with each other. An intranet, is a local or restricted network that enables people to store, organize, and share information within an organization.

Explanation:

4 0
3 years ago
Read 2 more answers
If you enjoy working with livestock, the best cluster in which to research careers would be: A. Health Science. B. Agriculture,
Pachacha [2.7K]

Answer:

B. Agriculture, Food, and Natural Resources.

Explanation:

The Agriculture, Food and Natural Resources career cluster is for those students who enjoy the outdoors and love working with both animals and plants. The cluster prepares most students for careers in agriculture products and services. This cluster includes a wide range of job occupations such as livestock farmer, florist, and many more. The animal systems career pathway will specifically deal with the business side of livestock. This career pathway will further include students who would want to work as animal breeders, farm workers, animal scientists, or nonfarm animal caretakers.

7 0
3 years ago
What does this mean “Fatal error: Uncaught exception 'Thrift\Exception\TTransportException' with message 'THttpClient: Could not
hodyreva [135]
You could try turning your pc completely off then back on or redownloading your browser
3 0
4 years ago
Other questions:
  • Write a sequence of statements that create a file named "greeting" and write a single line consisting of "Hello, World!" to that
    5·1 answer
  • peter has recently bought a media player and a digital camera. he wants to buy a memory card for these devices. which memory dev
    11·1 answer
  • Which feature is a component of a database application?
    7·1 answer
  • True or false. Every word has only one correct spelling and pronunciation.
    6·1 answer
  • ____ is a practice where a user in enticed by possible rewards and then asked to provide personal information.
    14·1 answer
  • The amount of ram that is actually on the memory modules in your computer is the ________ memory.
    11·1 answer
  • A _______ is a website specially designed to allow visitors to use their browser to add, edit, or delete the site's content.
    9·2 answers
  • 1.03!! need help!! kinda hard!!
    13·1 answer
  • A user of Augmented Reality is able to experience<br> of information on their surroundings.
    11·1 answer
  • To freeze rows 1 and 2, and columns 1, 2, and 3, which cell should you highlight before selecting freeze panes?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!