In Python!!
1. Correcting string errors
It's easy to make errors when you're trying to type strings quickly.
Don't forget to use quotes! Without quotes, you'll get a name error.
owner = DataCamp
Use the same type of quotation mark. If you start with a single quote, and end with a double quote, you'll get a syntax error.
fur_color = "blonde'
Someone at the police station made an error when filling out the final lines of Bayes' Missing Puppy Report. In this exercise, you will correct the errors.
# One or more of the following lines contains an error
# Correct it so that it runs without producing syntax errors
birthday = "2017-07-14'
case_id = 'DATACAMP!123-456?
2. Load a DataFrame
A ransom note was left at the scene of Bayes' kidnapping. Eventually, we'll want to analyze the frequency with which each letter occurs in the note, to help us identify the kidnapper. For now, we just need to load the data from ransom.csv into Python.
We'll load the data into a DataFrame, a special data type from the pandas module. It represents spreadsheet-like data (something with rows and columns).
We can create a DataFrame from a CSV (comma-separated value) file by using the function pd.read_csv.
# Import pandas
import pandas as pd
# Load the 'ransom.csv' into a DataFrame
r = ___.___('___')
# Display DataFrae
print(r)
3. Correcting a function error
The code in the script editor should plot information from the DataFrame that we loaded in the previous exercise.
However, there is an error in function syntax. Remember that common function errors include:
Forgetting closing parenthesis
Forgetting commas between each argument
Note that all arguments to the functions are correct. The problem is in the function syntax.
# One or more of the following lines contains an error
# Correct it so that it runs without producing syntax errors
# Plot a graph
plt.plot(x_values y_values)
# Display the graph
plt.show()
4. Snooping for suspects
We need to narrow down the list of suspects for the kidnapping of Bayes. Once we have a list of suspects, we'll ask them for writing samples and compare them to the ransom note.
A witness to the crime noticed a green truck leaving the scene of the crime whose license plate began with 'FRQ'. We'll use this information to search for some suspects.
As a detective, you have access to a special function called lookup_plate.
lookup_plate accepts one positional argument: A string representing a license plate.
# Define plate to represent a plate beginning with FRQ
# Use * to represent the missing four letters
____ = ____
Please help out~~~

Answers

Answer 1

Answer:

Following are the solution to the given points:

Explanation:

For point 1:

birthday = "2017-07-14" # defining a string variable birthday that string value  

case_id = 'DATACAMP!123-456?' #defining a variable case_id that stores the string value

In this, two variable "birthday and case_id" is defined, that holds the string value. In the first variable, it uses the hyphen sign to hold the date value as a string. In the second variable, it uses a single quoit to store string value.  

For point 2:

import pandas as pd # using import package to import pandas  

r = pd.read_csv('ransom.csv')# defining r variable that uses pandas to Load the 'ransom.csv' file

print(r)#use print method to print r value

In this code, a pandas package is imported, and in the next step r variable is defined that uses the read method to hold the csv file , and the print method to print r value.

For point 3:

plt.plot(x_values, y_values) # Plot method to hold parameters values

plt.show()#calling the show method

In this code, the plot method is used, which accepts two-parameter to store its value into plt, and in the next step, it uses the show method.  

For point 4:

# Defining a plate variable to represents the plate that starts with FRQ

# Using the * to represent the four missing letter

plate = lookup_plate('FRQ*)  


Related Questions

Classify the characteristics as abstract classes or interfaces.

A. Uses the implements keyboard
B. Cannot have subclasses
C. Does not allow static and final variables
D. Can have subclasses
E. Uses the extends keyboard
F. Allows static and final variables

Answers

E for eeeedeerreeeee

______ are special characters that allow you to
search for multiple words at the same time.
-Find expressions
-Defined expressions
-Regular expressions
-Search expressions

Answers

Answer:

Defined Expression

Explanation:

This will be your answer

CH4 has how many of each type of atom?

Answers

Its easy that moderators that see this answer can think that my answer isn't without explanation.

• Type of atom C (Carbon)

C = 1

• Type of atom H (Hydrogen)

H = 4

You dont understand? JUST SEE THE FORMULA C MEANS ONLY HAVE 1 CARBON ATOM AND H4 MEANS 4 ATOM OF HYDROGEN

oK. have a nice day hope you understands

How does the pay for many Science, Technology, Engineering, and Mathematics workers compare to the overall median for all careers? It is far lower than the overall median. It is far higher than the overall median. It is slightly higher than the overall median. It is about the same as the overall median.

Answers

Answer:

B

Explanation:

It just is

Answer:

B is correct

Explanation:

Other Questions
HURRY PLEASE... 75 POINTS Which one of the following statements is true concerning the magnitude of the electric field at a point in space? It is a measure of the electric force on any charged object. It is a measure of the ratio of the charge on an object to its mass. It is a measure of the electric force per unit mass on a test charge. It is a measure of the electric force per unit charge on a test charge. It is a measure of the total charge on the object. What human actions contributed to the nutrient pollution of Lake Okeechobee?PLZ HELP MEEEEEEEEEEEEEEEE I BEG YOU All hurricanes must have an energy source to form and grow. From where does this energy come?A. High air pressuresB. Warm ocean watersC. The Earth's rotation on its axisD. Warm air rises and pulls cooler air is pulled into it What was the main achievement of the Maurya family?O A. to unify IndiaO B. to impose BuddhismO C. to build famous templesO D. to improve the lives of peasants 1. Name the protists fitting each of the following descriptions.Write down only the correct name next to the relevant question number.1.1 A protozoan which moves using its pseudopodia.1.2 A protozoan which moves using its flagellum.1.3 A filamentous green alga.1.4 A unicellular green alga.1.5 Microscopic protists which appear as symmetrical, human-made, andglass-like ornaments.1.6 Protists that look like fungi.(6) Which shape below has both reflection and rotation symmetry Take ur time!! Thank u How do you write 4.2x10^5 in scientific notation there are 48 serving in 8 pizzas. how many servings are in 40 pizzas? PLEASE HELP IM DYING RN.WHAT IS X? 6(x+2)=2(x-3) How do whales differ from fishA) whales use blowholes for breathing B) whales have scales that cover the skin C) whales develop lungs following metamorphosis D) whales reproduce through external fertilization simplify 2 - 10 (-6v - 6) a. Where did the Serbians go? PLS HELP ME!! I'm having a brain freeze at the moment- State sales tax S is directly proportional to retail price p . An item that sells for 172 dollars has a sales tax of 12.32 dollars. Find a mathematical model that gives the amount of sales tax S in terms of the retail price p . Function: S ( p ) plz someone help !!!!!!!!!!! please help meQuadrilateral ABCD is similar to quadrilateral A'B'C'D'. Select all statementsthat must be true. there is 4 opinion in the photo Use the given information to find the amount of A in the account earning compound interest after 6 years when the principal is $3500. r=2.29%, compound monthly John sells appliances for a living. He sold adishwasher for $475. If he makes 20%commission, how much money will he make?