COURSE 2: GET STARTED WITH PYTHON

Module 1: Hello, Python!

GOOGLE ADVANCED DATA ANALYTICS PROFESSIONAL CERTIFICATE

Complete Coursera Study Guide

INTRODUCTION – Hello, Python!

You’ll begin by exploring the basics of Python programming and why Python is such a powerful tool for data analysis. You’ll learn about Jupyter Notebooks, an interactive environment for coding and data work. You’ll investigate how to use variables and data types to store and organize your data; and, you’ll begin practicing important coding skills.

Learning Objectives

  • Explain how to convert data types in Python
  • Define fundamental data types such as integer, float, and string
  • Interpret the naming conventions and restrictions for variables in Python
  • Describe the purpose and procedure of assigning variables
  • Define fundamental concepts of object-oriented programming such as object, class, method, and attribute
  • Recognize the uses and benefits of Jupyter Notebook for data work
  • Identify the basic features and capabilities of the Python programming language
  • Explain how to import modules in Python scripts using import
  • Introduce Jupyter notebook as a python environment
  • Perform arithmetic operations
  • Use built-in functions and keywords to explore data
  • Understand why Python is relevant to data science
  • Understand packages and interpreter options for Python
  • Identify the concept of algorithms in python
  • Identify the value of Python competency for data careers
  • Define Python and what syntax means

PRACTICE QUIZ: TEST YOUR KNOWLEDGE: GET STARTED WITH THE COURSE

1. Fill in the blank: Computer _____ refers to the process of giving instructions to a computer to perform an action or set of actions.

  • analyzing
  • visualizing
  • programming (CORRECT)
  • science

Correct: Computer programming refers to the process of giving instructions to a computer to perform an action or set of actions.

2. In Python, what is a library?

  • A sequence of data visualizations
  • The words and symbols used to write instructions for computers to follow
  • A reusable collection of code (CORRECT)
  • A chain of transistors

Correct: In Python, a library is a reusable collection of code.

3. Python is a low-level programming language.

  • True
  • False (CORRECT)

Correct: Python is a high-level programming language. Low-level programming languages are difficult to use, require lots of training, and often only work on specific machines. 

PRACTICE QUIZ: THE POWER OF PYTHON

1. Fill in the blank: Jupyter Notebook is an open source _____ for creating and sharing documents containing live code, mathematical formulas, visualizations, and text.

  • web application (CORRECT)
  • dot notation
  • library
  • programming language

Correct: Jupyter Notebook is an open-source web application for creating and sharing documents containing live code, mathematical formulas, visualizations, and text.

2. In object-oriented programming, objects can contain both data and useful code that manipulates that data.

  • False
  • True (CORRECT)

Correct: In object-oriented programming, objects can contain both data and useful code that manipulates that data.

3. What are examples of classes in Python? Select all that apply.

  • Cells
  • Integers (CORRECT)
  • Floats (CORRECT)
  • Strings (CORRECT)

Correct: Examples of classes in Python include integers, floats, and strings.

PRACTICE QUIZ: TEST YOUR KNOWLEDGE: USING PYTHON SYNTAX

1. Variables can only store values of numeric data types.

  • True
  • False (CORRECT)

Correct: Variables can store values of any data type.

2. What are best practices when assigning a new variable? Select all that apply.

  • Determine the variable’s keyword
  • Determine the variable’s starting value (CORRECT)
  • Determine the variable’s name (CORRECT)
  • Determine the variable’s data type (CORRECT)

Correct: Best practices when assigning a new variable include determining the variable’s name, data type, and starting value.

3. Fill in the blank: An _____ is a combination of numbers, symbols, or other variables that produce a result when evaluated.

  • argument
  • attribute
  • expression (CORRECT)
  • object

Correct: An expression is a combination of numbers, symbols, or other variables that produce a result when evaluated.

4. Which data type represents numbers that contain decimals?

  • Integer
  • Float (CORRECT)
  • String
  • Boolean

Correct: The float data type represents numbers that contain decimals.

Liking our content? Then, don’t forget to ad us to your bookmarks so you can find us easily!

QUIZ: MODULE 1 CHALLENGE

1. A data team researches which programming language they can use  to perform their coding work most effectively. They want a language that is easy to learn and has a supportive user community. Ultimately, they select Python. What are some other benefits of using Python for coding? Select all that apply.

  • Python is a low-level language.
  • Python is versatile. (CORRECT)
  • Python has thousands of open-source libraries. (CORRECT)
  • Python is based on simple syntax. (CORRECT)

Correct!

2. Fill in the blank: The open-source web application _____ enables users to share documents containing live code, mathematical formulas, visualizations, and text. It also puts all output into a single document, which is very useful when first learning about programming.

  • Dynamic coding
  • Dot notation
  • Implicit analysis
  • Jupyter Notebook (CORRECT)

Correct!

3. Fill in the blank: In Python, a _____ is a function that belongs to a class and typically performs an action or operation.

  • Method (CORRECT)
  • cell
  • string
  • keyword

Correct!

4. Fill in the blank: _____ is the process of storing a value in a variable.

  • Assignment (CORRECT)
  • Expression
  • Conversion
  • Syntax

Correct!

5. A data professional names a variable in Python, then receives an error message. What might they have included in the name incorrectly? Select all that apply.

  • More than one underscore
  • More than one number
  • Reserved functions (CORRECT)
  • Reserved keywords (CORRECT)

Correct!

6. Which of the following is an effective variable name?

  • able_variable (CORRECT)
  • able(variable)
  • 5_able_variables
  • _able_int_variable

Correct!

7. In Python, which data type represents a sequence of characters and punctuation that contains textual information?

  • Boolean
  • String (CORRECT)
  • Float
  • Integer

Correct!

8. A data professional converts integers into strings using a predefined function. This is an example of what type of conversion?

  • Mutable conversion
  • Immutable conversion
  • Implicit conversion
  • Explicit conversion (CORRECT)

Correct!

9. A data professional investigates which programming language they can use to perform their coding work most effectively. They want to use a versatile language based on simple syntax. Ultimately, they select Python. What are some other benefits of using Python for coding? Select all that apply.

  • Python is a low-level language.
  • Python is easy to learn. (CORRECT)
  • Python has a large and supportive community of users. (CORRECT)
  • Python has thousands of open source libraries available for use. (CORRECT)

Correct!

10. In Python, what describes the process of storing a value in a variable?

  • Conversion
  • Expression
  • Syntax
  • Assignment (CORRECT)

Correct!

11. A data professional names a variable in Python, then receives an error message. Which of the following elements may have caused the error? Select all that apply.

  • Letter
  • Underscore
  • Tab (CORRECT)
  • Ampersand (CORRECT)

Correct!

12. In Python, which data type represents whole numbers without fractions?

  • Integer (CORRECT)
  • Float
  • Boolean
  • String

Correct!

13. A data professional performs a calculation involving integers and floats. Python automatically converts the integers to floats. This is an example of what type of conversion?

  • Mutable conversion
  • Explicit conversion
  • Implicit conversion (CORRECT)
  • Immutable conversion

Correct!

14. Fill in the blank: The open-source web application _____ enables data professionals to modularize code into cells in order to organize them in sections, as well as collaborate on data projects and integrate code.

  • Jupyter Notebook (CORRECT)
  • Dot notation
  • Dynamic coding
  • Implicit analysis

Correct!

15. A data professional names a variable in Python. To ensure they follow proper naming conventions, what may the variable name contain? Select all that apply.

  • Reserved keywords
  • Numbers (CORRECT)
  • Underscores (CORRECT)
  • Letters (CORRECT)

Correct!

16. In Python, which data type represents numbers that contain decimals?

  • Float (CORRECT)
  • Boolean
  • Integer
  • String

Correct!

17. A manager explores which programming language their team can use to perform coding work most effectively. They want a language with thousands of open-source libraries for reference. Ultimately, they select Python. What are some other benefits of using Python for coding? Select all that apply.

  • Python is a low-level language.
  • Python has a large and supportive user community. (CORRECT)
  • Python is based on simple syntax. (CORRECT)
  • Python is versatile. (CORRECT)

Correct!

18. Fill in the blank: In Python, a _____ is an object’s data type that bundles data and functionality together.

  • Class (CORRECT)
  • keyword
  • float
  • method

Correct!

19. In Python, what does assignment refer to?

  • A value associated with an object or class which is referenced by name using dot notation
  • A sequence of characters and punctuation that contains textual information
  • The process of storing a value in a variable (CORRECT)
  • A combination of numbers, symbols, or other variables that produce a result when evaluated

Correct!

20. Fill in the blank: In Python, an _____ is a value associated with an object or class which is referenced by name using dot notation.

  • integer
  • assignment
  • expression
  • attribute (CORRECT)

Correct!

21. Which of the following is an effective variable name? Mark all that apply.

  • fun(variables)
  • fun variable$
  • fun_with_variables (CORRECT)
  • fun_for_variables (CORRECT)

Correct!

22. A data professional converts floats into strings using a predefined function. This is an example of what type of conversion?

  • Implicit conversion
  • Immutable conversion
  • Mutable conversion
  • Explicit conversion (CORRECT)

Correct!

23. There are four fundamental concepts in object-oriented programming, including objects. What are the other three concepts? Select all that apply.

  • Operators
  • Classes (CORRECT)
  • Methods (CORRECT)
  • Attributes (CORRECT)

Correct: The four fundamental concepts in object-oriented programming include objects, classes, attributes, and methods.

24. Fill in the blank: Naming _____ are rules built into the syntax of the language itself that must be followed.

  • expressions
  • keywords
  • restrictions (CORRECT)
  • assignments

Correct: Naming restrictions are rules built into the syntax of the language itself that must be followed.

25. Fill in the blank: The _____ data type is a sequence of characters and punctuation that contains textual information.

  • String (CORRECT)
  • float
  • integer
  • assignment

Correct: The string data type is a sequence of characters and punctuation that contains textual information.