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
jolli1 [7]
1 year ago
9

In Python write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs

the values of the list.
Ex: If the input is:

10
5
3
21
2
-6
the output is:

[10, 5, 3, 21, 2]

Code hints: while user_input >0: #This is the number that is greater than 0 from the list that is entered.

print(user_numbers) #Prints out the numbers greater than zero that are inputted at the top part.
Computers and Technology
1 answer:
Lilit [14]1 year ago
3 0

Answer:

ansList =input().split() #get input and split it by space

ansList = [int(i) for i in ansList if int(i)>0] #turn string to integer,and get all positive integers

print(ansList)

Explanation: I think this would work for you. I leace comments in the answer.

You might be interested in
WHAT TYPES OF ACTIVITIES ARE PERFORMED BY HEALTH CARE SOFTWARES
Makovka662 [10]

Answer:

lectronic Health Record (EHR) Software. ...

Medical database software. ...

Medical research software. ...

Medical diagnosis software. ...

Medical imaging software. ...

E-prescribing software. ...

Telemedicine software. ...

Appointment scheduling (booking) software.

6 0
3 years ago
Mrs. Dunn shows her students a data range, which has been named "Goals," covering cells A14 to A25. She tells her students that
Butoxors [25]

Answer:

Hina and Riko; the dialog box is inside the Name Manager group, and it allows the user to manually type in the additional cells or select the cells after clicking the collapse button.

3 0
3 years ago
You may have come across websites that not only ask you for a username and password, but then ask you to answer pre-selected per
raketka [301]

Answer:

The questions are used to secure and identify you furthermore. Answering personal questions that only you can answer will deter someone from hacking into your account that easily.

Explanation:

5 0
2 years ago
In Microsoft Access, what happens when you save a query once and run it but then add more to the query? What will happen? a)erro
Usimov [2.4K]
D)When the query is run again, the data that meets the new criteria will be retrieved.
5 0
3 years ago
1. It is a set of integrated devices that input, output,
grin007 [14]

Answer:

A

Explanation:

Program system and software canot pulg in

4 0
2 years ago
Other questions:
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • Use the following cell phone airport data speeds​ (Mbps) from a particular network. Find P10. 0.1 0.1 0.3 0.3 0.3 0.4 0.4 0.4 0.
    7·1 answer
  • What was one complication caused by the tsunami that struck japan in 2011?
    15·1 answer
  • Write the definition of a method min that has two int parameters and returns the smaller.
    9·1 answer
  • Description:
    7·1 answer
  • What are some examples of what can be changed through options available on the mini toolbar
    5·1 answer
  • Can anyone help me this is due today :) <br> Thank you so much
    14·2 answers
  • 2. To ________
    7·1 answer
  • You text file begins with the following rows. The pattern is a description of the item to be repaired, its color, and the issue.
    14·1 answer
  • Profitability, consumer relations, and competition are involved in what kinds of concerns in the design process?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!