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
notsponge [240]
3 years ago
8

8.11 LAB: Filter and sort a list

Computers and Technology
1 answer:
Helen [10]3 years ago
6 0

nums = input("Enter your numbers: ")

lst = nums.split()

new_lst = ([])

for i in lst:

   if int(i) >= 0:

       new_lst.append(int(i))

new_lst.sort()

for x in new_lst:

   print(x, end=" ")

The above code is in case the user enters the numbers.

def func(lst):

   lst.sort()

   for i in lst:

       if i >=0:

           print(i, end=" ")

lst = ([10,-7, 4, 39, -6, 12, 2])

func(lst)

The above code is in case you must input the numbers manually via a function.

I hope this helps!

You might be interested in
A customer has a new laptop with wireless WAN capabilities; however, the software does not connect to the Internet. What would y
LUCKY_DIMON [66]

Answer:

Check below for the explanation

Explanation:

The following suggestions will be given to the customers:

  • Go to network settings and check the WIFI settings to confirm whether the WIFI connection is on. Switch the WIFI to the on position if it is off.
  • The customer should check if the wireless driver is installed on the computer, if the driver is not installed, he should try to install it
  • The customer should check all the available access points and confirm if their signal strengths are strong enough to allow for any connections. Restart the access point to enhance proper connection.
  • Check to see if your operating system is updated to support your internet connection. You can update your operating system to the latest version
  • Run a Network Diagnostics on your computer. This will run a couple of tests to see what’s possibly causing your Wi-Fi issues.
5 0
4 years ago
On which tab are import and export commands located in Access? A. Home B. Database Tools C. External Data D. Create
Ann [662]

Answer:

C. External Data

Explanation:

On the External Data tab, you can find import and export commands located in Access.

7 0
4 years ago
9. If you want to change the Header text of any Form then which property will you use
Lady_Fox [76]

Answer:

header

Explanation:

i would use header

8 0
3 years ago
What does the security element of non-repudiation mean in e-commerce cybersecurity? A. Data needs to be available at all times.
VARVARA [1.3K]

Answer:

Non-repudiation is the assurance that someone cannot deny the validity of something. Non-repudiation is a legal concept that is widely used in information security and refers to a service, which provides proof of the origin of data and the integrity of the data

Explanation:

8 0
4 years ago
Which of the following uses replication to Infect multiple computers?
Nikolay [14]

Answer:

Trojan horse

Explanation:

mostly all the above mentioned use replication to infect computers but the one that uses replication to invest multiple computers at a time is Trojan horse.

hope it helps .

3 0
3 years ago
Read 2 more answers
Other questions:
  • A company has a file server that shares a folder named Public. The network security policy specifies that the Public folder is a
    14·1 answer
  • (Complete the Problem-Solving discussion in Word for Programming Challenge 2 on page 404. Your Problem-Solving discussion should
    13·1 answer
  • A Network Attached Storage device is good for _____.
    11·2 answers
  • What is a traffic controller?what are its functions?
    13·1 answer
  • What is the missing term in the code that handles that error??
    11·1 answer
  • Open the NetBeans IDE and create a new project named MySizes.java. Your program should do the following:
    9·1 answer
  • I need help!! I decided to go back to college this year and am taking Intro to Logic and Programming. I have an assignment due t
    5·1 answer
  • What is HDLC flow control?​
    6·1 answer
  • Identify the following verb by number and person by checking on the appropriate boxes.
    15·2 answers
  • Please explain what steps you will take to prevent hackers from getting access to your personal information.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!