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
maxonik [38]
3 years ago
9

Write a program that gets a list of integers from input, and outputs non-negative integers in ascending order (lowest to highest

).

Computers and Technology
1 answer:
STALIN [3.7K]3 years ago
7 0

Answer:

Program written in python and executed in jupyter notebook

# creating an empty list  

integer_list = []

# Number of elemets in list as input  

n = int(input("Enter number of elements : "))  

 

# iterating till the range  

for i in range(0, n):  

   element = int(input())

   # if element is positive then add it in list

   if element > 0:  

     integer_list.append(element) # adding the element  

integer_list.sort()

print(integer_list)

You might be interested in
What is information cycle
DIA [1.3K]

Answer:

The term information cycle refers to the way information is processed and distributed and how it changes over time. It is usually used to describe the progression of media coverage relating to a particular newsworthy event or topic during which information goes through various stages of reporting and publication.

8 0
3 years ago
Read 2 more answers
Jason wants to open a program with the command prompt window. Which command should he type in the Run dialog box to open the com
Montano1993 [528]
<span>1. Tap or click the Start button, followed by All apps.

If you're not using the Desktop in Windows 10, tap the All apps button on the bottom-left of your screen instead. It's the icon that looks like the small list of items.

Tip: The Power User Menu is a much faster way to get to Command Prompt in Windows 10 but only if you're using a keyboard or mouse. Just choose Command Prompt from the menu that appears after pressing WIN+X or right-clicking on the Start button. </span><span><span>Find the Windows System folder from the list of apps and tap or click it. </span><span>Under the Windows System folder, click or tap Command Prompt.

Command Prompt should open immediately. </span><span>You can now execute whatever commands in Windows 10 you'd like to run.</span></span>
4 0
3 years ago
What is the final amount stored in value if the computer selects 17 as the
nadya68 [22]

Answer: -17

Explanation:

Our random number is 17. Let's go through line by line.

  1. value is a random number picked which is 17
  2. valueB = 17 / 2 = 8.5
  3. If value is greater than 0 AND value has a remainder of 1, we will set the value to value* -1.
  4. Value is now 17 * -1 = -17

Let's quickly calculate value mod 2. 17 % 2 = is 1. If you're wondering how we did that, the remainder after dividing 8 into 17 twice is 1, because 17 - 16 = 1.

We stop after line 4 because we stop the conditional statement after one condition is filled.

6 0
3 years ago
The title element in the head section of an HTML document specifies the text
bagirrra123 [75]

Answer: c. that's displayed in the title bar of the browser

Explanation:

The title element in the html write up is used to describe the title of the work that is been carried out.

It has the format <title></title>, the title name is indicated between the opening and closing title tag.

The title does not display on the main page of the Web user's display, but it can be seen on the title bar of the Web browser.

The title element help Web user to have an idea of what a Web page is about.

7 0
3 years ago
If a user’s current directory is /home/mary/project1, which command could she use to move to the etc directory directly under th
kykrilka [37]

Answer:

Option 4 is the correct answer to the above question.

Explanation:

In the Linux operating system, The etc folder is listed on the root directory. When any user wants to go in the root directory of the Linux operating system from anywhere, then he needs to follow the command of the name of the folder where he wants to go with the '/' symbols. The above question states that the user wants to go to the etc folder of the root directory, then he needs to press the command '/etc' with the help of cd command because cd command is used to open any folder. So the option 4 is the correct, while the other is not because--

  • Option 1 states about cd which gives the error.
  • Option 2 states about cd /home/mary/etc which take the user to the etc folder which is in the mary folder.
  • Option 3 states about the cd etc which is used to take the user on the etc folder which is in the current folder.
  • Option 5 states about the cd\etc which gives the error.
8 0
3 years ago
Other questions:
  • Decrypt the message OPEHHISTLWILKWPR which is the cyphertext produced by encrypting a plaintext message using the transposition
    14·1 answer
  • What kinds of variables are accessible from outside of the class?
    8·1 answer
  • Page _____ refers to whether a page is laid out vertically or horizontally.
    12·1 answer
  • An app for a hair styling stop needs a form for the various services that they offer. What control should be used to display all
    6·1 answer
  • What channel will the republian debate be broadcast on?
    6·2 answers
  • Which keyboard feature is a form feed character?
    15·1 answer
  • Nonverbal messages from the movie it​
    5·2 answers
  • Design by contract considers the software system to be a setof:
    10·1 answer
  • The spreadsheet below shows the age, grade level, major, and minor of four students in college. A purple background in the
    5·1 answer
  • Which three IP addresses may be pinged by the Test Management Network feature in the ESXi hosts DCUI
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!