Free Introduction to Programming (Python) study guide

This free Introduction to Programming (Python) study guide has 15 topics, 144 flashcards and 62 practice questions, starting with Statements, Expressions and Objects. It suits college students taking an introductory course and is built from the open textbook “Introduction to Python Programming” by OpenStax (CC BY-NC-SA 4.0). It is free to use, and the study aids are generated automatically, so check important facts against your own textbook.

Study this course free

What you will study

15 topics, in the order of the textbook. Your own course may order them differently, so follow your syllabus.

Chapter 1: Statements

The statement print("Good morning") instructs Python to output the message "Good morning" to the user. The statement count = 0 instructs Python to assign the integer 0 to the variable count.

Chapter 2: Expressions

Expressions are often a combination of literals, variables, and operators. Expressions can be arbitrarily long, consisting of many calculations.

Chapter 3: Objects

Chapter 4: Decisions

The Python interpreter follows a single path of execution when executing a program. Ex: Instead of always taking the left path, a program uses the path width to decide which path to take.

Chapter 5: Loops

A loop is a code block that runs a set of statements while a given condition is true. This chapter also introduces break and continue statements for controlling a loop's execution.

Chapter 6: Functions

Functions are the next step toward creating optimized code as a software developer. If the same block of code is reused repeatedly, a function allows the programmer to write the block of code once, name the block, and use the...

Chapter 7: Modules

As programs get longer and more complex, organizing the code into modules is helpful. Ex: The following code, written in a file named greetings.py, defines a module named greetings.

Chapter 8: Strings

Python provides useful methods for processing string values. In this chapter, string methods will be demonstrated including comparing string values, string slicing, searching, testing, formatting, and modifying.

Chapter 9: Lists

Lists are a useful way of collecting data elements. Python lists are extremely flexible, and, unlike strings, a list's contents can be changed.

Chapter 10: Dictionaries

A Python dictionary is a data type for storing the data in a key-value pair format. This chapter also introduces ways to use dictionaries, including looping over dictionary items and performing conditional statements on a...

Chapter 11: Classes

A programmer can model real-world entities as objects for better program design and organization. Classes add benefits like data abstraction and encapsulation, which organize code for better usability and extensibility.

Chapter 12: Recursion

Recursion simplifies programs by calling smaller versions of a given problem that are used to generate the solution to the overall problem.

Chapter 13: Inheritance

Classes within inheritance relationships can inherit attributes and methods from other classes without needing to redefine everything. Thus, inheritance in object-oriented programming reduces redundancy and promotes modularity.

Chapter 14: Files

Programming often involves reading information from files and writing information into files. Reading and writing files can lead to exceptions when the file specified cannot be found.

Chapter 15: Data Science

Data Science provides the ability to derive insights and make informed decisions from data. Data science helps people make decisions in disciplines as diverse as healthcare, business, education, politics, environmental science...

Try some

Real flashcards and practice questions from this study guide, with their answers.

Flashcard 1

In your own words: what does “computer” mean?

Answer: A computer is an electronic device that stores and processes information.

Flashcard 2

In your own words: what does “loop” mean?

Answer: A loop is a code block that runs a set of statements while a given condition is true.

Flashcard 3

In your own words: what does “feature” mean?

Answer: A feature is an individual variable or attribute that is calculated from the raw data in the dataset.

Practice question 1

Fill in the blank: A _____ is a collection of code that can be used in other programs.

  • A. Library
  • B. Newline
  • C. Keywords
  • D. Output

Answer: A. Library

A library is a collection of code that can be used in other programs.

Practice question 2

Fill in the blank: A _____ is an individual variable or attribute that is calculated from the raw data in the dataset.

  • A. DataFrame
  • B. Feature
  • C. JupyterLab
  • D. Pandas

Answer: B. Feature

A feature is an individual variable or attribute that is calculated from the raw data in the dataset.

Study this course free

Prerequisites and next steps

What to study next

More in Computer science

Also used for

Programming in Python (high school).

About this study pack

Attribution: Adapted from “Introduction to Python Programming” by OpenStax (https://openstax.org/details/books/introduction-python-programming), CC BY-NC-SA 4.0. Study aids (flashcards, quiz questions, summaries) were generated automatically from the text; they may contain errors.

Frequently asked questions

Is the Introduction to Programming (Python) study guide free?

Yes. StudyGrasp is always free: no paywall and no credit card. Students create a free account so that their progress is saved.

What textbook is the Introduction to Programming (Python) study guide based on?

It is built from “Introduction to Python Programming” by OpenStax, an open textbook licensed under CC BY-NC-SA 4.0. StudyGrasp adapted it and is not affiliated with its authors or publisher.

How many practice questions does it have?

It has 62 practice questions and 144 flashcards across 15 topics. They are generated automatically from the textbook and marked Draft, so they can contain mistakes.

Can I use it offline or install it?

You can add StudyGrasp to your phone or computer. The app opens offline, and flashcards you have opened keep working without a connection. Offline copies are cleared when you sign out.

Study Introduction to Programming (Python) free

Ask questions that cite the textbook, practise with flashcards and quizzes, and keep your own notes private. Study this course free

StudyGrasp is not affiliated with the textbook publishers named here. Browse all courses · FAQ