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]
2 years 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]2 years 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 is one benefit of Powerpoint Online?
VashaNatasha [74]

Answer:

for edge users

anyone with the url

Explanation:

6 0
3 years ago
Read 2 more answers
Which organization plays a key role in development of global health informatics?
tensa zangetsu [6.8K]

Answer:

International Medical Informatics Association (IMIA)

Explanation:

In respect of the question which askabout the organization who play an important role in regards to the development of global health informatics is International Medical Informatics Association (IMIA).

International Medical Informatics Association (IMIA) which is an interni association which are independent which works toward expanding and sustaining of global Biomedical and Health Informatics community and give maximum support to international initiative which are geared towards providing adequate and standardized health for each and everyone in the world at large.

3 0
3 years ago
What does the following code do? Assume list is an array of int values, temp is some previously initialized int value, and c is
BigorU [14]

Answer:

Option D is correct.

Explanation:

Option D is correct because  when the condition  if (list[j] < temp) is tested it only gets true when element in list[] array at <em>jth</em> position is less than the value in <em>temp</em> and after that it increments the value of c by this statement: c++ and so c is incremented from 0 to as much times as much elements in list[] are lesser than temp.

6 0
3 years ago
Read 2 more answers
When was the idea of the cloud first developed?<br><br> 2000s<br> 1990s<br> 1960s<br> 1980s
kondaur [170]

Answer:I would say 1980 is the answer or The answer is B 1980.

5 0
3 years ago
What type of IPv6 address should you use when you have multiple routers on a subnet and want hosts to use the nearest router for
kirill115 [55]

Answer:

anycast

Explanation:

Anycast -

It refers to as the routing methodology and the networking address where only one destination address has more than two pathway for the end destination , is referred to as an anycast .

In this case , the router has the capability to select the pathway to reach the destination , depending on the latency measurement , cost , distance and hops .

Hence , from the given information of the question ,

The correct answer is anycast .

8 0
3 years ago
Other questions:
  • How to use javascript libraries in javascript code?
    9·1 answer
  • Sending a busy manager a long email represents a problem in which area of the communication process
    7·1 answer
  • the control programs managing computer hardware and software use the ______ function to control and prioritize tasks performed b
    8·1 answer
  • What information on social networking sites could be used to discriminate against a potential employee
    9·1 answer
  • An optimal solution to a linear programming problem MUST lie A. somewere on the line between two corner points. B. somewhere out
    12·1 answer
  • 2.
    8·1 answer
  • The Clean Air Act Amendments of 1990 prohibit service-related releases of all ____________. A) GasB) OzoneC) MercuryD) Refrigera
    15·1 answer
  • Please help me plss! PLS​
    8·2 answers
  • In 1972, earlier designers built the
    6·1 answer
  • There is overlap in the subjects of study in the different information technology disciplines. true or false
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!