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
astraxan [27]
2 years ago
11

use a list comprehension to remove all the numbers divisible by 4 in the list [20,24,30,35,36,40,42,44,50]

Computers and Technology
1 answer:
igomit [66]2 years ago
6 0

Python program showing the use of list comprehension. Below is attached output image of the code.

<h3>Python code</h3>

  • # create List

def createList():

   list = [20,24,30,35,36,40,42,44,50]

   print("List: ")

   print(list)

   return list

   

  • # remove Divisible By 4 from the list

def removeDivisibleBy4 (list):

   print("New list: ")

   newList = [num for num in list if num%4 != 0]

   print(newList)

   

  • # Main program

if __name__ == '__main__':

   list=createList()

   removeDivisibleBy4(list)

To learn more about Python list comprehension see: https://brainly.in/question/9141031

#SPJ4

You might be interested in
The primary purpose of an ids is to detect intrusions, log suspicious events, and send alerts.
Kamila [148]

Hello, Mochacon, so to answer this question, we must understand what and ids is. A intrusion detection system (IDS) is a device or software application that monitors network or system activities for malicious activities or policy violations and produces electronic reports to a management station. IDS come in a variety of "flavors" and approach the goal of detecting suspicious traffic in different ways. So according to this definition, this statement is true since and ids does detect intrusions, detects suspicious events indeed, and sends alerts when intrusions happen.

Hope this helped!

3 0
3 years ago
​___________, such as smart phones and social​ media, fundamentally change the nature of an industry and can be influential enou
svlad2 [7]

Answer:

Disruptive Technologies.

Explanation:

Smart Phones and the social media are very power tools they can be used to spread a news like a fire very rapidly.

People mostly believe the new that come on their smartphones and the social media.

So the employees of the company can also be influenced by these technologies hence they can disrupt the work of the company and can make or break the company.

6 0
4 years ago
Write multiple if statements. If car_year is 1969 or earlier, print "Few safety features." If 1970 or later, print "Probably has
Paladinen [302]

Answer:

This program is executed in Dev C++ using C++ as a programming language.

Explanation:

#include<iostream>

using namespace std;

int main()

{

int carModelNo;

cout<<"Enter Car Model Number  ";

cin>>carModelNo;

 

EnterAgain:

 if(carModelNo==1969)

{

 cout<<"Few safety features.";

}

else if(carModelNo==1979)

{

 cout<<"Probably has seat belts.";

}

else if(carModelNo==1999)

{

 cout<<"Probably has antilock brakes.";

}

else if(carModelNo==2000)

{

 cout<<"Probably has airbags.";

}

else

{

 "Car Model Information Currently not Available";

 cout<<"Please enter the car model such as 1969, 1979, 1999, or 2000  ";

 cin>>carModelNo;

 goto EnterAgain;

}

return 0;

}

3 0
3 years ago
A(n) _____ is a request for the database management software to search the database for data that match criteria specified by th
timama [110]
A query, specifically a select statement.
4 0
3 years ago
Read 2 more answers
HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
topjm [15]

Adam might have forgotten to loop the guessing code, meaning that instead of letting him guess multiple times, it simply does it once and ends the program. This could be fixed by adding a while loop, or something of the sort, that doesn't let the user finish the program until they guess the number correctly, while adding to the variable that stores the number of guesses each loop.

8 0
4 years ago
Other questions:
  • Which is a feature of a strong thesis statement? A) It presents only the facts. B) It is open-ended. C) It answers the central q
    15·1 answer
  • Why is the cpu the most important component in a computer?
    6·1 answer
  • What happens to weather patterns when a cold front approaches? What happens to
    14·1 answer
  • 11.19 (Constructor Failure) Write a program that shows a constructor passing information about constructor failure to an excepti
    6·1 answer
  • You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are ap
    15·2 answers
  • Number of frames displayed per second
    15·1 answer
  • Explain the procedure you will undertake to create a new partition​
    11·1 answer
  • Text that is positioned at the top of a column and labels the<br> column.
    7·1 answer
  • Write the following abbreviations in full next to the question number
    15·1 answer
  • Using AI to filter potential job applicants might be considered _____
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!