TBYs Coding Academy Logo

Home > Programs > Introduction to Python

Introduction to Python

Course Description

This comprehensive course offers an immersive learning experience in Python programming. Designed to provide a solid foundation in coding, the curriculum delves into essential concepts while allowing participants to explore the nuances of each topic. Throughout the course, students will acquire the skills needed to become proficient Python programmers.

  • Understand Python Fundamentals
  • Execute Control Flow
  • Harness Loops
  • Create and Manage Functions
  • Master String Manipulation
  • Handle Errors Gracefully
  • Apply Learning Through Projects
  • Demonstrate Problem-Solving
  • Create Practical Projects
  • Comprehensive Review
  • The “Introduction to Python” course is meticulously designed for individuals who are new to programming and those looking to gain a strong foundational understanding of Python. This course aims to cater to beginners who have little to no prior experience in coding.
  • No Requirements

Course Module

Course Material

Course Details

Objective / Topics Covered
  • Variables
  • Types
  • User Input
  • Converting Input Types
  • Arithmetic Expressions
  • String Operators
  • Comments
  • Graphics in Python

Example exercises
  • Printing
    • Print messages to the console
  • Variable
    • Create variables of different types, and print them to the console
  • Types
    • Investigate the types of different variables
    • Convert between types
  • Arithmetic Expressions & Converting Input Types
    • Age in One Year – Ask the user how old they are, and tell them how old they will be in one year
    • Rectangle, part 1 – Make variables for length and width and compute area and perimeter
    • Rectangle, part 2 – Ask the user for length and width and compute area and perimeter
Objective / Topics Covered
  • If Statements
  • Boolean Values
  • Logical Operators
  • Comparison Operators
  • Floating Point Numbers and “Equality”

Example exercises
  • If statements and boolean values
    • Is it raining? – Write a program that uses a boolean variable to determine whether or not it is raining
  • Boolean operators, and expressions
    • Boolean variable – Take a variable and use it in an if statement
    • Legally allowed to vote – User reports age and program tells them whether or not they can vote in the US
    • Transaction – User reports balance and deposit/withdrawal, and program prints new balance or error
    • Recipe – Ask the user for ingredients, amounts per serving, and number of servings, and report the total amount of each ingredient needed
Objective / Topics Covered
  • While Loops
  • For Loops
  • Break and Continue
  • Nested Control Structures

Example exercises
  • While Loops
    • Divisibility – Ask the user to enter a numerator and denominator, and re-prompt until the denominator is non-zero
  • For Loops
    • Average test score – Compute the average of several test scores
  • Break and Continue
    • Higher/ Lower – Ask the user to guess a particular number between 1 and 100. If the user’s guess was too high or too low, they should be notified
  • Nested Control Structures
    • Rolling Dice – Print out all combinations that can be made when 2 dice are rolled
Objective / Topics Covered
  • Functions
  • Namespaces
  • Parameters
  • Return Values
  • Exceptions

Example exercises
  • Functions
    • Raining cats and dogs – Write functions to print text art of a cat and a dog
    • Temperature converter – write functions to convert from Fahrenheit to Celsius and vise versa
  • Exceptions
    • Temperature converter, part 2 – Add exception handling to your temperature conversion program
  • Putting it all together
    • Enter a positive number – Make a function to repeatedly ask the user to enter a number until they enter a positive number
Objective / Topics Covered
  • Indexing and Slicing
  • Math Operators on Strings
  • For Loops Over a String
  • String Methods

Example exercises
  • Indexing
    • First character – write a function that takes a string and returns the first character
    • All but the first character – write a function that takes a string and returns everything but the first character
  • Math operators and strings
    • Full name – write a function that takes two strings (a first name and a last name) and returns a full name as a single string
    • Replace a letter – write a function that takes a string and returns a copy with the character at a particular index replaced with a dash
  • For loops on strings
    • Count occurrences – write a function that takes two strings and returns the number of times the second string appears in the first string
  • String methods
    • Add enthusiasm – write a function that takes a string and returns that string in all upper case
    • Remove all from string – write a function that takes two strings and returns a string that consists of the first string with all instances of the second string removed
Objective / Topics Covered
  • Tuples
  • Lists
  • For Loops and Lists
  • List Methods

Example exercises
  • Tuples
    • Cookout Orders – Given a tuple of food orders, add up the number of burgers and number of hotdogs and print the total sums
  • Lists
    • Listed Greeting – Ask a user to enter their name, age, and favorite sport, then split their response into list elements and use index values to greet them by name and respond that you enjoy that sport as well!
    • Exclamation Points – Ask the user for a string and then print the same string with every lowercase  replaced with an exclamation point
    • Librarian – Ask the user for the last names of the authors of the five books they are returning. Print a list of those names in sorted order
Objective / Topics Covered
  • Dictionaries
  • 2d lists
  • List comprehensions
  • Packing and unpacking
  • Mutable vs. immutable
  • Equivalence vs identity

Example exercises
  • Dictionaries
    • Phone book – user repeatedly enters name, and program either asks for the person’s phone number or reports the phone number already provided
  • 2D Lists
    • Checkerboard – write a program that prints the initial setup of a checkerboard, with a 1 where a piece would be and a 0 where a blank square would be