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
Which components are involved with input? Output? Processing? Storage?
VMariaS [17]

Answer: Output

input keyboard mouse joystick graphics tablet trackball touchpad touchscreen microphone sensor      

Processing     processor (CPU) processor (GPU) memory motherboard

Output printer monitor touchscreen plotter speakers headphones motor data projector

Explanation:

5 0
2 years ago
Read 2 more answers
What is an effective way to record change management? (5 points)
yanalaym [24]

Answer:

Detailed Notes

Explanation:

I took the 2.04 quiz

3 0
3 years ago
It is possible to collaborate on a presentation with a group of people using the Internet.
DerKrebs [107]

Answer:

True

Explanation:

4 0
3 years ago
So this is what i use to code and all of that
givi [52]

Answer: yeah!

Explanation:

Have a good day!

5 0
2 years ago
Computer Networks - Queues
lyudmila [28]

Answer:

the average arrival rate \lambda in units of packets/second is 15.24 kbps

the average number of packets w waiting to be serviced in the buffer is 762 bits

Explanation:

Given that:

A single channel with a capacity of 64 kbps.

Average packet waiting time T_w in the buffer = 0.05 second

Average number of packets in residence = 1 packet

Average packet length r = 1000 bits

What are the average arrival rate \lambda in units of packets/second and the average number of packets w waiting to be serviced in the buffer?

The Conservation of Time and Messages ;

E(R) = E(W) + ρ

r = w + ρ

Using Little law ;

r = λ × T_r

w =  λ × T_w

r /  λ = w / λ  +  ρ / λ

T_r =T_w + 1 / μ

T_r = T_w +T_s

where ;

ρ = utilisation fraction of time facility

r = mean number of item in the system waiting to be served

w = mean number of packet waiting to be served

λ = mean number of arrival per second

T_r =mean time an item spent in the system

T_w = mean waiting time

μ = traffic intensity

T_s = mean service time for each arrival

the average arrival rate \lambda in units of packets/second; we have the following.

First let's determine the serving time T_s

the serving time T_s  = \dfrac{1000}{64*1000}

= 0.015625

now; the mean time an item spent in the system T_r = T_w +T_s

where;

T_w = 0.05    (i.e the average packet waiting time)

T_s = 0.015625

T_r =  0.05 + 0.015625

T_r =  0.065625

However; the  mean number of arrival per second λ is;

r = λ × T_r

λ = r /  T_r

λ = 1000 / 0.065625

λ = 15238.09524 bps

λ ≅ 15.24 kbps

Thus;  the average arrival rate \lambda in units of packets/second is 15.24 kbps

b) Determine the average number of packets w waiting to be serviced in the buffer.

mean number of packets  w waiting to be served is calculated using the formula

w =  λ × T_w

where;

T_w = 0.05

w = 15238.09524 × 0.05

w = 761.904762

w ≅ 762 bits

Thus; the average number of packets w waiting to be serviced in the buffer is 762 bits

4 0
3 years ago
Other questions:
  • The process of making raw materials into a finished product is known as
    14·2 answers
  • How does climate research depend on digital technology
    12·1 answer
  • To aid Android app developers, who must account for multiple screen sizes and resolutions, Android has introduced the ____, whic
    15·1 answer
  • Now tell me how be rich like Bill Gates
    6·1 answer
  • Identify why research and a clearly written problem statement are important. Select all that apply. They result in a clear and c
    5·2 answers
  • The fractional_part function divides the numerator by the denominator, and returns just the fractional part.
    10·1 answer
  • How are software myths affecting software process?. Explain with example​
    9·1 answer
  • An enhancement to a computer accelerates some mode of execution by a factor of 10. The enhanced mode is used 50% of the time, me
    11·1 answer
  • Please answer this question correctly​
    9·1 answer
  • Enabling encryption of all data on a desktop or laptop computer is generally considered:______.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!