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
It is a life long skills like spelling, it is a skill of typing data currently and quickly using a computer keyboard
viva [34]
Is this a riddle bro?
6 0
3 years ago
Different between internet and email​
pentagon [3]

Answer:

The internet allows you to connect with people and information around the world. The internet is more broad and could include searching things up or message-based websites. Emails is more specific, with it being when you send someone a message (called an email) on a mail website (that allows you to get messages from other people, websites, etc.)

Explanation:

In my answer.

5 0
4 years ago
An alternate method to open the word count dialog is to click _______ on the status bar at the bottom of the word window
kondor19780726 [428]

An alternate method to open the word count dialog is to right click the blue portion on the status bar at the bottom of the word window.  The status Bar will roll down showing different functions including WORD COUNT. Click WORD COUNT and it will show up on the bottom left with the count of words you have written.

7 0
4 years ago
With the range E2:E30 selected, create a new conditional formatting rule that uses a formula to apply yellow fill and bold font
Nana76 [90]

Answer:

Attached are the excel screenshots

3 0
4 years ago
Who is considered as the father of computer science​
Andru [333]

Answer:

Turing is considered as the father of computer science

4 0
3 years ago
Read 2 more answers
Other questions:
  • You are reviewing the style sheet code written by a colleague and notice several rules that are enclosed between the /* and */ c
    12·1 answer
  • Description A data retrieval tool that finds specified data within a database A collection of records All of the fields for a si
    7·1 answer
  • __________ is a contemporary term for data and software tools for organizing, analyzing, and providing access to data to help ma
    6·1 answer
  • Which of the following can a cell contain?
    9·2 answers
  • Seeking additional information is known as _____.
    12·2 answers
  • Reverse Word Order: Write a program that reverses the order of the words in a given sentence. This program requires reversing th
    15·1 answer
  • What is table,form,query and report ?short ans​
    13·1 answer
  • Write a paragraph discussing privacy issues on the internet<br> and their impact on human lives.
    9·1 answer
  • What Microsoft feature enables you to represent text as colorful visuals
    12·1 answer
  • During slide show mode, hitting the B key will do which of these things? end your presentation move back one page move to the fi
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!