7.2.5.Weekly challenge 2 - quanganh2001/Google-Data-Analytics-Professional-Certificate-Coursera GitHub Wiki

Glossary: Terms and definitions

We’ve covered a lot of terms—some of which you may have already known, and some of which are new. To make it easy to remember what a word means, we created this glossary of terms and definitions.

To use the glossary for this course item, click the link below and select “Use Template.”

Link to glossary: Week 2 Glossary

OR

If you don’t have a Google account, you can download the glossary directly from the attachment below.

Course 7 Week 2 Glossary _ DA terms and definitions

Weekly challenge 2

1st

Question 1

Which of the following are examples of variable names that can be used in R? Select all that apply.

  • _21alpha
  • 21_alpha
  • alpha_21
  • alpha21

Question 2

You want to create a vector with the values 43, 56, 12 in that exact order. After specifying the variable, what R code chunk lets you create the vector?

A. c(43, 56, 12)

B. c(12, 56, 43)

C. v(12, 56, 43)

D. v(43, 56, 12)

The correct answer is A. c(43, 56, 12)

Question 3

A data analyst wants to create the date February 27th, 2027 using the lubridate functions. Which of the following are examples of code that would create this value? Select all that apply.

  • mdy(02272027)
  • dmy(02272027)
  • mdy("2027-02-27")
  • ymd("2027-02-27")

Question 4

A data analyst wants to assign the value 50 to the variable daily_dosage. Which of the following types of operators will they need to use in the code?

A. Relational

B. Logical

C. Arithmetic

D. Assignment

The correct answer is D. Assignment

Question 5

Which of the following files in R have names that follow widely accepted naming convention rules? Select all that apply.

  • p1+infoonpatients.R
  • title*123.R
  • patient_details_1.R
  • patient_data.R

Question 6

A data analyst wants to create functions, documentation, sample data sets, and code test that they can share and reuse in other projects. What should they create to help them accomplish this?

A. A data frame

B. A tidyverse

C. A package

D. A data type

The correct answer is C. A package

Question 7

A data analyst needs to find a package that offers a consistent set of functions that help them complete common data manipulation tasks like selecting and filtering. What tidyverse package provides this functionality?

A. readr

B. dplyr

C. ggplot2

D. tidyr

The correct answer is B. dplyr

Question 8

A data analyst previously created a series of nested functions that carry out multiple operations on some data in R. The analyst wants to complete the same operations but make the code easier to understand for their stakeholders. Which of the following can the analyst use to accomplish this?

A. Comment

B. Vector

C. Pipe

D. Argument

The correct answer is C. Pipe

2nd

Graded 100%

Question 1

Which of the following are examples of variable names that can be used in R? Select all that apply.

  • autos_5
  • _red_1
  • utility2
  • 3_sales

Question 2

What function is used to create vectors in the R programming language?

A. vector()

B. c()

C. v()

D. combine()

The correct answer is B. c()

Question 3

A data analyst wants to create the date February 27th, 2027 using the lubridate functions. Which of the following are examples of code that would create this value? Select all that apply.

  • mdy("2027-02-27")
  • mdy(02272027)
  • dmy(02272027)
  • ymd("2027-02-27")

Question 4

A data analyst inputs the following code in RStudio:

change_1 <- 70

Which of the following types of operators does the analyst use in the code?

A. Logical

B. Arithmetic

C. Assignment

D. Relational

The correct answer is C. Assignment

Question 5

Which of the following is a best practice when naming variables in R?

A. Use lowercase for variable names.

B. Use a space character to separate words in variable names.

C. Variable names should be verbs.

D. Variable names should start with special characters.

The correct answer is A. Use lowercase for variable names.

Question 6

A data analyst wants to create functions, documentation, sample data sets, and code test that they can share and reuse in other projects. What should they create to help them accomplish this?

A. A package

B. A data type

C. A data frame

D. A tidyverse

The correct answer is A. A package

Question 7

A data analyst needs a system of packages that use a common design philosophy for data manipulation, exploration, and visualization. What set of packages fulfills their need?

A. Base

B. Recommended

C. CRAN

D. tidyverse

The correct answer is D. tidyverse

Question 8

A data analyst writes the following code in a script and gets an error. What is wrong with their code?

penguins %>% 
  filter(flipper_length_mm == 200) %>% 
  group_by(species) %>% 
  summarize(mean = mean(body_mass_g))

A. They are using too many functions.

B. The last line should not have a pipe operator.

C. The first line should have a pipe operator before penguins.

D. They are using the wrong characters for the pipe operator.

The correct answer is B. The last line should not have a pipe operator.