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
HINTS;
ExtremeBDS [4]
Good job! please mark as branliest?!
4 0
3 years ago
What are the two different types of dns requests?
Fantom [35]

The two major types of DNS request are as follows;

  • Recursive Query
  • Iterative Query

<h3>What is a domain name system?</h3>

Domain name system is abbreviated as DNS.

A Domain Name System (DNS) converts domain names into IP addresses, which allow browsers to get to websites and other internet resources.

Basically,  DNS is a directory of names that match with numbers.

Computer uses IP addresses to communicate, therefore, the DNS convert domain names to IP address for communication.  

The two major types of DNS request are as follows;

  • Recursive Query - Query that demands a resolution
  • Iterative Query - Query that does not demand a resolution.

learn more on DNS here: brainly.com/question/14397200

#SPJ11

6 0
2 years ago
Read 2 more answers
Name and define (or list the set that defines) three of the four common data types in programming.
Dominik [7]

Answer: this is the  Answer your question

6 0
3 years ago
Most simple computer programs follow the basic pattern defined by the acronym IPO. What does IPO mean with regards to programmin
Art [367]

Answer:

IPO means Input - Process - Output

Explanation:

The IPO model means that a computer program is given an input to process, it processes the given input and return an output as the result.

3 0
3 years ago
Wat is the difference between primary storage, secondary storage, and off-line storage
Hitman42 [59]
Primary storage would be downloads and whatever goes directly to your Dropbox or something like that. Secondary storage would also be downloads, but it would be the things that go to your hard drive, and lastly, off-line storage is storage on things like Flash Drives or CD-ROMs.
6 0
3 years ago
Other questions:
  • This is the main work area of your computer.
    7·1 answer
  • Write a method that will receive 2 numbers as parameters and will return a string containing the pattern based on those two numb
    10·1 answer
  • Two or more computers that are linked together are called which of the following
    7·1 answer
  • Which technique/concept can be use toimplement multiple inheritances<br> in java?
    13·1 answer
  • What is a Hard Drive
    13·1 answer
  • Where on the internet can you find a site that will allow you to tour bill gates mansion
    8·2 answers
  • For safety, the lights on your vehicle must be in good working condition. Which statement about
    8·2 answers
  • The last time period the federal government of these United States ran a budget surplus was ________.
    9·1 answer
  • My speaker on my phone is not working, when I try and play music and videos the sound dosen't work. However my alarm works. Can
    9·2 answers
  • Which file is usually the first file to be displayed when you navigate to a website?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!