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 the only language a microprocessor can process directly but most programmers almost never write programs in this code? Q
elixir [45]
A microprocessor can directly process machine code but most programmers almost never write in it.
C. Machine code
7 0
3 years ago
Read 2 more answers
Pls help due tonight<br>Will give brainiest
katrin2010 [14]
HIPPA law is Health Insurance Portability and Accountability Act of 1996. It’s a federal law that helps consumers maintain their insurance coverage.
8 0
3 years ago
Read 2 more answers
Sensors send out ............ signals​
son4ous [18]

Answer:

mhmm................... ok

3 0
3 years ago
Richard Palm is the accounting clerk of Olive Limited. He uses the source documents such as purchase orders, sales invoices and
sdas [7]

Answer:

Lack of segregation of duties

Explanation:

Internal Controls are set of rules and guidelines that are followed to ensure effectiveness of business operations. The main risk in the business is weak internal controls. There are some organizations with strong internal controls but implementation of such controls is a challenge for organizations. There are human errors, IT security risks, fraud and compliance risk.

The risks associated with Olive limited is that there is no segregation of duties, Richard Palm is preparing journal vouchers, posts the journal vouchers and reconciles the balance himself. If he makes an error in recording a transaction there is no one who reviews his work and can identify an error. Also if Richard is involved in a fraud and collaborates with purchase department or sales department staff, he can pass a transaction without any supervision.

5 0
3 years ago
What is the default letter assigned for the primary hard drive?
SVETLANKA909090 [29]

d drive i think unless ssd

8 0
3 years ago
Other questions:
  • What website can help you find antivirus software
    5·2 answers
  • Which of the following tasks are suitable for creating an algorithm? Choose all that apply.
    14·1 answer
  • Use the distributive property to expand the following expression. (9m - 6)7
    13·2 answers
  • •Should other states wait to see if the high-speed rail system works well before starting their own plans for similar systems?
    15·1 answer
  • For a typical middle-income family, what is the estimated cost of raising a child to the age of 18?
    11·1 answer
  • Word documents contain how many sections by default?
    9·1 answer
  • Create the following SQL Server queries that access the Northwind database. Place them in a zip file and place the zip file in t
    6·1 answer
  • Whats the difference between Input and Output? Give and example of an example on a M:B​
    15·1 answer
  • You're making great progress on your assignment. You've defined the purpose of your message, identified both the primary and sec
    9·1 answer
  • 5. Nadia wants to calculate the total interest, which is the total amount of the payments minus the loan amount. In cell F6, ent
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!