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

In Python please.

Computers and Technology
1 answer:
SOVA2 [1]3 years ago
5 0

Answer:

negatives = []

zeros = []

positives = []

while True:

   number = input("Enter a number: ")

   if number == "":

       break

   else:

       number = int(number)

       if number < 0:

           negatives.append(number)

       elif number == 0:

           zeros.append(number)

       else:

           positives.append(number)

for n in negatives:

   print(n)

for z in zeros:

   print(z)

for p in positives:

   print(p)

Explanation:

Initialize three lists to hold the numbers

Create a while loop that iterates until the user enters a blank line

Inside the loop:

If the number is smaller than 0, put it in the negatives list

If the number is 0, put it in the zeros list

Otherwise, put the number in the negatives list

When the while loop is done, create three for loops to print the numbers inside the lists

You might be interested in
What is the default setting Excel shows when Insert is clicked?
NikAS [45]

Answer: entire column

7 1
3 years ago
Read 2 more answers
Pleeeese help me for these questions
geniusboy [140]

1 Account

2 online

3 access

4 password

5 internet

6 email

4 0
3 years ago
if someone has become very attached to their mobile device and feels anxious if the cannot connect to the internet, what are the
svp [43]

Answer:

Anxiety

Explanation:

trust I have it

4 0
3 years ago
Instant messaging is synchronous
ASHA 777 [7]
True; synchronous means existing or occurring at the same time (I really don't know if that's a question but oh well) 
7 0
3 years ago
Word provides an undo button that can be used to cancel the most recent command or action. true or false.
erastova [34]
The answer would be true.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Are commonly used to control the number of times that a loop iterates?
    5·1 answer
  • ----------HELP WITH 3 QUESTIONS FOR 30 POINTS!!!---------
    6·1 answer
  • A U.S. social security number consists of a string of 9 digits, such as "444422333". Declare a char array named ssn suitable for
    5·1 answer
  • Dylan, an interior designer, has sketched out a layout for a client's living room. He wants the client's approval of the layout
    11·2 answers
  • SATCOM in the Ku- and Ka- bands, as well as EHF systems are adversely affected by rain (the higher the frequency, the greater th
    14·1 answer
  • Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both sing
    10·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • PLEASE ANSWER!! If my pixel has an RGB value of (R - 150, G - 0, B - 100), what is the dominant value? Why?
    14·1 answer
  • Match the TCP/IP Layer to a problem that can happen there.
    8·1 answer
  • which two partitions do you typically create at minimum during a fedora linux installation? (choose two answers.)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!