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
Declare k, d, and s so that they can store an integer, a real number, and a small word (under 10 characters). Use these variable
Svetradugi [14.3K]

Answer:

int k;

double d;

char s[10];

cin >> k >> d >> s;

cout << s << " " << d << " " << k << "\n" << k << " " << d << " " << s;

Explanation

First Step (declare K, d, s) so they can store a integer

int k;

double d;

char s[10];

Second Step (read in an integer, a real number and a small word)

cin >> k >> d >> s;

Third Step ( print them out )

cout << s << " " << d << " " << k << "\n" << k << " " << d << " " << s;

5 0
3 years ago
What should software firm design for the VR sample at Museum?
gladu [14]

The software firm design for the VR sample at Museum is a 360-degree video that shows a walk through of the virtual studio of a famous artist that is aided by a narration about the various piece of art that the user wants to focus on.

<h3>How is VR used in museums?</h3>

VR is known to be a technology that puts the user inside the experience they are viewing. It is known to be a kind of  interactive or it is one that take the shape of 360-degree video.

The use of VR is done so as to form or create museum tours, so that exhibits in the museum can be interactive, and to bring the different scenes to reality.

Learn more about museums from

brainly.com/question/95815

5 0
3 years ago
URGENTE DOY 60 PUNTOS. Porfavor alguien sabe como se llama el juego de mesa que consiste en adivinar la palabra con audifonos qu
Anastasy [175]

Answer:

retro del susurro

Explanation:

el reto del susurro es el juego divertido donde alguien tiene que adivinar que le están diciendo cuando están escuchando música

3 0
3 years ago
Name two primary goals of quality assurance and control programs:
bulgar [2K]

Answer:

The two main goals are to reach CMM level 5, and when the company can be termed as optimized.

The second goal is to minimize the bugs at the current level as well. And this is important, as improvement is one thing, and ensuring you are correct at the current time is another, and which is essential for survival. And you can think of improvement only if you survive.

Explanation:

The dream of all companies is to become Optimized. And they always try to reach CMM level 5, such that they can serve their clients in the best possible manner. And it is the quality assurance team that keeps an eye on the working of the company and keeps on giving their feedback so that the team can provide better service to the clients in the future, and probably reach the CMMI level 5.

The control program makes the operating system better through the development of an environment in which one can run various other programs. And it, in general, formulates the graphical interface and leverage you to run various programs at one time in various windows. And the control programs are also being known as the operating environment.

5 0
3 years ago
To see if a website is using a secure connection, what should you look for? Select all that apply.
kupik [55]

Answer:

– A web address using “HTTPS” (The extra “S”means it’s a secure connection. – Secure sites show a closed padlock emblem you can click on for security details – the most trustworthy sites will have green padlocks or address bars.

Explanation:

6 0
3 years ago
Other questions:
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • Which of the following is a good choice to help you stay organized when you are away from the office? A. Personal Information ma
    7·1 answer
  • What is the name of the subsystem that transfers data between components inside a pc or between pcs?
    12·1 answer
  • Caitlyn's Crafty Creations computes a retail price for each product as the cost of materials plus $14 multiplied by the number o
    10·1 answer
  • Refer to the exhibit. All workstations are configured correctly in VLAN 20. Workstations that are connected to switch SW1 are no
    14·1 answer
  • Why do you think it is important to consider ethical considerations when reviewing technology and assessing the impact of partic
    9·1 answer
  • Why do filmmakers release trailers?
    5·2 answers
  • Section A: A(n) is a collection of information, generally stored as computer files. The information it contains can be stored, u
    10·1 answer
  • What are the advantages of knowing demographics over psychographics and vice versa?
    12·1 answer
  • We're given the training set data with the following values for variable X1:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!