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
Irina18 [472]
3 years ago
9

Notice that the iris.target array contains 3 different labels. Create a plot that you think is interesting using the data from t

he iris.data array. Use three different colors to label each point with a color representing its species. Correctly label the x and y axes and include a legend for species.
Computers and Technology
1 answer:
Alexeev081 [22]3 years ago
8 0

Answer:

from sklearn.datasets import load_iris

import seaborn as sns

import pandas as pd

data = load_iris()

final_data = data.data[:]

final_data = pd.DataFrame(final_data)

final_data.columns = ['SepalLengthCm', 'SepalWidthCm', 'PetalLengthCm', 'PetalWidthCm']

species = data.target[:]

final_data['Species'] = species

sns.pairplot(final_data, hue='Species')

Explanation:

You might be interested in
What's wrong with Brainly now? Now people think it's site for s.ex which it isn't. These weirdos need to go
Dmitry [639]

Answer:

Honestly it is disgusting.

6 0
3 years ago
Read 2 more answers
Write a program that divides mystery_value by mystery_value #and prints the result. If that operation results in an #error, divi
Zolol [24]

Answer:

mystery_value = 5  

try:

   print(mystery_value / mystery_value)

except:

   try:

       print(mystery_value / (mystery_value + 5))

   except:

       print(mystery_value * 5)

5 0
3 years ago
Timeliness is an important goal of any access control monitoring system.<br> A. True<br> B. False
Damm [24]
The answer for this question is true
7 0
4 years ago
Which network type allows a vnic to access a network directly using the host machine's nic?
siniylev [52]
The answer is <span>​Bridge mode.  It is the </span>network type that allows a vnic to access a network directly using the host machine's nic.  <span>In Wi-Fi networking, </span>bridge mode<span> allows two or more wireless access points to communicate and join their respective local networks. </span>
3 0
3 years ago
"Crayon Colors The file ShortColors.txt initially contains the names of all the colors in a full box of Crayola crayons. Write a
s2008m [1.1K]

Answer:

I am writing the Python program. Since you have not attached the ShortColors.txt file so i am taking my own text containing the names of the colors. You can use this program for your ShortColors.txt file.

infile = "ShortColors.txt"

outfile = "NewFile.txt"

f_read = open(infile)

f_write = open(outfile, "w+")

for name in f_read:

   if len(name)<=7:

       name.rstrip()

       f_write.write(name)

f_read.close()

f_write.close()

Explanation:

I will explain the program line by line.

infile = "ShortColors.txt"  creates an object named infile which is used to access and manipulate the text file ShortColors.txt. This file contains names of colors. This object will basically be used to access and read the file contents.

outfile = "NewFile.txt"  creates an object named outfile which is used to access and manipulate the text file NewFile.txt. This text file is created to contain the colors from ShortColors.txt whose name contains less than or equal to six characters. This means NewFile.txt will contain the final color names after deletion of color names containing more than six characters.

f_read = open(infile)  in this statement open() method is used to open the ShortColors.txt file. f_read is an object. Basically the text file is opened to read its contents.

f_write = open(outfile, "w+")   in this statement open() method is used to open the NewFile.txt file. f_write is an object. Basically this text file is opened in w+ mode which means write mode. This is opened in write mode because after deleting the colors the rest of the colors with less than or equal to six characters are to be written in this NewFile.txt.

for name in f_read:  this is where the main work begins to remove the colors with more than six characters. The loop reads each name from the ShortColors.txt file and here f_read object is used in order use this text file. This loop continues to read each name in the text file and executes the statements within the body of this loop.

if len(name)<=7:  this if condition in the body of for loop checks if the length of the color name is less than or equal to 7. Here each character is counted from 0 to 6 so that is why 7 is used. To check the length of every color name len() method is used which returns the length of each name.

name.rstrip()  this method rstrip() is used to remove the characters from each name whose length is greater than 6.

f_write.write(name)  now write() method is used to write the names of all the colors with less than or equal to six characters in NewFile.txt. For this purpose f_write object is used.

Here i did not remove the colors from the original file ShortColors.txt to keep all the contents of the file safe and i have used NewFile.txt to display color names after deletion of all colors whose name contains more than six characters.

After the whole process is done both the files are closes using close() method.

Attached screenshots are of the program, the ShortColors.txt and NewFile.txt.

4 0
4 years ago
Other questions:
  • For security reasons a network administrator needs to ensure that local computers cannot ping each other. which settings can acc
    5·1 answer
  • The next page and previous page buttons allow you to navigate through a worksheet while in print preview mode.
    6·1 answer
  • Select the correct answer from each drop-down menu.
    7·2 answers
  • A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
    14·1 answer
  • The letters after the name of a file indicate who created the file.<br> O True<br> O False
    5·2 answers
  • HTML, the markup language of the web, specifies colors using the RGB model. It uses a two-digit hexadecimal (that is, base 16) r
    13·1 answer
  • 5. Why do we need programming language?​
    13·2 answers
  • A feature that allows you to quickly apply the contents of one cell to another cell or range of cells selected.
    6·1 answer
  • Which of these are correctly formatted python lists? check all that apply. list1=(race, cars, trucks, bikes) list2=[‘computer sc
    7·1 answer
  • How to achieve competitive advantage using information systems models
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!