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
Marrrta [24]
3 years ago
9

How to create a function, called separate_int_and_str, which takes in a list and separates out the integer values and strings in

to their own lists in python?
Computers and Technology
1 answer:
gregori [183]3 years ago
4 0

Answer:

program :

def separate_int_and_str(list_1):# function to seprate the list.

   str_list=[] #list to hold the

   int_list=[]#list which holds the integer value.

   for x in list_1: #for loop to extract the list.

       if(type(x)==str): #if condition to check the type of the element.

           str_list.append(x)#create a list for the string value.

       elif(type(x)==int): #check condition for th einteger value.

           int_list.append(x)#create a list for the integer value.

Explanation:

  • The above-defined function is written in the python language, which used the code to separate the list for integer and the string value.
  • There are two lists define in the function which holds the integer and the string value separately.
  • There is a 'for' loop which scans the element of the list and checks the list by the help of type function which tells the class of the element.
  • Then if the type function states that the element is from the strong class, it will assign the element on the string list otherwise it assigns the element in the integer list.
You might be interested in
A ___________ is a variable used to pass information to a method.
Sauron [17]

A <em>parameter </em>is a variable used to pass information to a method.

3 0
3 years ago
Read 2 more answers
Which of the following is the core of an operating system that maintains the computer’s clock, starts applications, and assigns
nika2105 [10]

Kernal is the core of an operating system that maintains the computer’s clock, starts applications, and assigns the computer’s resources, such as devices, programs, apps, data, and information.

d. kernal.

<u>Explanation:</u>

Every operating system runs the operating system based on kernel instructions. Main or major role of operating system is kernel. If boot loader program fails to load kernel operation is missing the kernel we need to reinstall operating system or repair the operating system.

To display clock in the workstation or laptop or desktop, clock device driver been executed by kernel of operating system.

Kernel is core of any operating system, but kernel also controlled by operating system such as Unix etc.

3 0
3 years ago
Which of the following statements about wide area networks are true? Select 3 options.
Montano1993 [528]

Answer:

abd

Explanation:

connections usually occur through a public network

cool devices in a large geographic area

typically uses Ethernet and wirless routers to connect device

7 0
3 years ago
Adele’s mother owns a Daycare and she wants to learn all about this business, to help her mom and own it one day. Which CTSO sho
Gennadij [26K]

Answer:

She should join the Future Business Leaders of America–Phi Beta Lambda

Explanation:

CTSOs are Career and technical student organizations. These organizations are vocational and extracurricular groups based primarily in high schools, colleges and career technological centres, for students in Career and Technical Education. They are important parts of the high school and college programs.

The Future Business Leaders of America–Phi Beta Lambda prepares students to become community-minded business leaders. It provides opportunities to learn career skills and gain leadership experience.

Therefore Adele should pick this CTSO

7 0
4 years ago
The largest value (in hex) that can be loaded into Register A of HCS12 is (Points : 2) 0x8.
andrezito [222]

Answer:

0xFF.

Explanation:

The Register A of HSC12 is an 8-bit register.So the maximum value for 8 bit is 8 1's (11111111). So the decimal value for the maximum 8 bits is 255 but all the options given are in hexadecimal so among the given options only 0xFF has the value of 255 in decimal  F=(1111)₂.So two F's make 8 bits and their decimal value is 255.

7 0
3 years ago
Other questions:
  • Which option is referred to by the Animals tag?
    5·1 answer
  • Is Apple a consumer or luxury brand? Give examples.
    10·1 answer
  • ​_____ was the first commercially successful computer. ​z3 ​eniac ​univac ​colossus
    13·1 answer
  • Differentiate between Software as a service, platform as a service and infrastructure as a service.
    14·1 answer
  • Which term is defined as an exploit that takes place before the security community or software developer knows about the vulnera
    12·1 answer
  • Which functions are examples of logical test arguments used in formulas? Check all that apply. OR IF SUM COUNT NOT AND
    12·2 answers
  • What command would you use to add a file to an e-mail message?
    15·2 answers
  • To convert microseconds to nanoseconds: a. Take the reciprocal of the number of microseconds. b. Multiply the number of microsec
    13·1 answer
  • Project introduction​
    14·1 answer
  • Indicate if the statement is true or false False 1. A spreadsheet cannot recalculate after you have changed data in your workshe
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!