
In the next section, I will teach you how to configure the Smart Cheat Sheet on Windows, mac OS or Linux.
Install python and Visual Studio Code on macOS, set up a python project in Visual Studio Code, install the official python extension, and write and run your first program.
Install Python and VS Code on Ubuntu, create a Python project, install the official Python extension, run code, adjust font size and theme, and enable the Smart Cheat Sheet.
Smart Cheat Sheet Code: Table-String-Declaration
Smart Cheat Sheet Code: Table-Sequence-Characters
Smart Cheat Sheet Code: Example-Sequence-Characters
Smart Cheat Sheet Code: Example-Constant
Smart Cheat Sheet Code: Table-Variable-Naming-Rules
Smart Cheat Sheet Code: Table-Keywords-List
Smart Cheat Sheet Code: Example-String-Replication
Smart Cheat Sheet Code: Example-Input-Function
Smart Cheat Sheet Code: Example-DataTypes
Smart Cheat Sheet Code: Table-Arithmetic-Operators
Smart Cheat Sheet Code: Example-Arithmetic-Operators
Smart Cheat Sheet Code: Table-Operator-Precedence
Smart Cheat Sheet Code: Example-Operator-Precedence
Smart Cheat Sheet Code: Example-Type-Casting
Smart Cheat Sheet Code: Syntax_Exception_Handling
Smart Cheat Sheet Code: Example-Exception-Handling
Smart Cheat Sheet Code: Syntax-If
Smart Cheat Sheet Code: Syntax-If-Else
Smart Cheat Sheet Code: Syntax-If-Elif
Smart Cheat Sheet Code: Syntax-If-Elif-Else
Smart Cheat Sheet Code: Example-If-Statement
Smart Cheat Sheet Code: Table-Comparison-Operators
Smart Cheat Sheet Code: Table-Logical-Operators
Learn the difference between Python built-in functions and user-defined functions, with examples like print and input, calling by name and passing parameters.
Smart Cheat Sheet Code: Table-String-Functions
Smart Cheat Sheet Code: Example-Len-Function
Smart Cheat Sheet Code: Example-Capitalize-Function
Smart Cheat Sheet Code: Example-Count-Function
Smart Cheat Sheet Code: Example-Lower-Upper-Function
Smart Cheat Sheet Code: Example-isSpace-Function
Smart Cheat Sheet Code: Example-Replace-Function
Smart Cheat Sheet Code: Example-Calculate_Circle_Area
Smart Cheat Sheet Code: Example-Calculate_Circle_Area_With_Parameter
Smart Cheat Sheet Code: Example-Print_Personal_Info
Create a Python function that accepts three integers for day, month, and year, and prints the date in format year month day, using optional parameter names.
Solution Code: Solution-A3
Write a Python function that accepts three user inputs and prints the largest number, illustrating with a sample run and optional names for variables and the function.
Solution Code: Solution-A4
Solution Code: Solution-A5
Create a function that takes an integer and prints whether it is odd or even; a number is even when the remainder divided by two is zero.
Solution Code: Solution-A6
Solution Code: Solution-A7
Define a Python function that accepts a total cost and prints whether the order has free shipping, when totals exceed forty dollars. Use optional names for variables, parameters, and function.
Solution Code: Solution-A8
Write a function that takes two numbers and an operator to compute and print result, displaying errors for invalid inputs or operators, using optional names for variables and parameters.
Solution Code: Solution-A9
Smart Cheat Sheet Code: Example-Multiple-Variable-Assignment
Access characters in a Python string by index using 0-based numbering. Use negative indices to reach from the end and avoid index errors.
Smart Cheat Sheet Code: Example-Reverse-String
Smart Cheat Sheet Code: Example-Return-Value-1
Smart Cheat Sheet Code: Example-Return-Value-2
Smart Cheat Sheet Code: Example-Return-Value-3
Smart Cheat Sheet Code: Example-Return-Multiple-Values
Smart Cheat Sheet Code: Example-Default-Argument-Value
Use the pass statement as a placeholder to fill empty bodies in if statements, functions, and loops, preventing unexpected end-of-file errors during parsing.
Smart Cheat Sheet Code: Example-Nested-If
Write a function that accepts a string and returns true if it is a palindrome and false otherwise, using reverse equality as the check; illustrated with radar as a palindrome.
Solution Code: Solution-A10
Modify the previous Python exercise to ignore case sensitivity, so inputs like Mom return true.
Solution Code: Solution-A11
Write a function that takes a file name and returns its three-character extension, illustrated by a sample run.
Solution Code: Solution-A12
Design a function that masks a credit card number by showing only the last four digits and replacing the rest with asterisks, using string slicing.
Solution Code: Solution-A13
Solution Code: Solution-A15
Practice a function to validate ATM PIN codes by accepting a string and returning true only when it contains exactly four or six digits, with no other characters.
Solution Code: Solution-A16
Smart Cheat Sheet Code: Example-For-Loop
Smart Cheat Sheet Code: Example-Max-Ten-Numbers
Smart Cheat Sheet Code: Example-Range-Function-2
Smart Cheat Sheet Code: Example-Range-Function-3
Smart Cheat Sheet Code: Example-While-Loop
Use the break statement to terminate a loop prematurely in for and while loops; stop input ends the infinite loop, converts strings to ints, updates the max, and prints it.
Smart Cheat Sheet Code: Example-Loop-Else-Clause
Smart Cheat Sheet Code: Example-Loop-Else-Clause-2
Smart Cheat Sheet Code: Example-Multiplication-Table
Smart Cheat Sheet Code: Example-Access-List-Index
Smart Cheat Sheet Code: Example-Check_Item_In_List
Smart Cheat Sheet Code: Example-List-Slicing
Smart Cheat Sheet Code: Example-List-Length
Smart Cheat Sheet Code: Example-Inner-List
Smart Cheat Sheet Code: Example-List-Concatenate
Smart Cheat Sheet Code: Example-List-Update
Smart Cheat Sheet Code: Table-List-Functions
Smart Cheat Sheet Code: Example-List-All
Smart Cheat Sheet Code: Example-List-Any
Smart Cheat Sheet Code: Example-List-Append
Smart Cheat Sheet Code: Example-List-Insert
Smart Cheat Sheet Code: Example-List-Pop
Smart Cheat Sheet Code: Example-List-Clear
Smart Cheat Sheet Code: Example-List-Reverse
Smart Cheat Sheet Code: Example-List-Sort
Smart Cheat Sheet Code: Example-List-Sort-2
Smart Cheat Sheet Code: Example-List-Max-Min
Smart Cheat Sheet Code: Example-List-Iterate-For-Loop
Smart Cheat Sheet Code: Example-List-Iterate-While-Loop
Smart Cheat Sheet Code: Example-List-Iterate-Inner-List
Smart Cheat Sheet Code: Example-Tuple
Smart Cheat Sheet Code: Example-Tuple-In-Keyword
Smart Cheat Sheet Code: Example-Tuple-Slicing
Smart Cheat Sheet Code: Example-Tuple-Length
Smart Cheat Sheet Code: Example-Tuple-Concatenate
Smart Cheat Sheet Code: Example-Tuple-Inner-List
Smart Cheat Sheet Code: Example-Tuple-Unpack
Smart Cheat Sheet Code: Example-Tuple-For-Loop
Smart Cheat Sheet Code: Example-Tuple-While-Loop
Smart Cheat Sheet Code: Example-Set-Define
Smart Cheat Sheet Code: Example-Set-Length
Smart Cheat Sheet Code: Example-Set-For-Loop
Smart Cheat Sheet Code: Example-Set-Add
Smart Cheat Sheet Code: Example-Set-Remove
Smart Cheat Sheet Code: Example-Set-Clear
Smart Cheat Sheet Code: Example-Set-In-Not-In
Smart Cheat Sheet Code: Example-Set-Union
Smart Cheat Sheet Code: Example-Set-Union-Pipe
Smart Cheat Sheet Code: Example-Set-Intersection
Smart Cheat Sheet Code: Example-Set-Intersection-Ampersand
Smart Cheat Sheet Code: Example-Set-Difference
Smart Cheat Sheet Code: Example-Set-Difference-Minus
Smart Cheat Sheet Code: Example-Dictionary-Declaration
Smart Cheat Sheet Code: Example-Dictionary-Access-Item
Smart Cheat Sheet Code: Example-Dictionary-Delete-Item
Smart Cheat Sheet Code: Example-Dictionary-Length
Smart Cheat Sheet Code: Example-Dictionary-Keys
Smart Cheat Sheet Code: Example-Dictionary-Values
Smart Cheat Sheet Code: Example-Function-Print-Books
Smart Cheat Sheet Code: Example-Function-Return-List
Smart Cheat Sheet Code: Example-Random-Dice
Smart Cheat Sheet Code: Example-Random-List
Use a for loop to print a triangle of asterisks, introducing basic loop constructs in Python for absolute beginners.
Solution Code: Solution-A14
Learn to draw a triangle of asterisks using a while loop in Python, a practical exercise for absolute beginners to practice control flow and output formatting.
Solution Code: Solution-A17
Learn to implement a while loop that prints a triangle of asterisks, guiding beginners through basic loop logic and output formatting.
Solution Code: Solution-A18
Write a for loop to print all numbers divisible by 5 from ten to one hundred. A sample run demonstrates the program.
Solution Code: Solution-A19
Learn to use a while loop to print all numbers divisible by five from ten to one hundred.
Solution Code: Solution-A20
Solution Code: Solution-A21
Write a Python function that accepts three integers from, to, and step, and prints numbers from from to to, stepping by step, using a while loop and user input.
Solution Code: Solution-A22
Learn to write a Python function that checks if a list is empty by returning true or false, with a sample run.
Solution Code: Solution-A23
Note: Do not use the addition operator.
Solution Code: Solution-A24
Define a function that takes a list and returns a random item from it. The sample runs show different results, illustrating completely random output.
Solution Code: Solution-A25
Learn to define a Python function that accepts two sets and returns their common items, with a sample run illustrating the program.
Solution Code: Solution-A26
Learn to build a Python program with two functions: one generates a list of 10 random numbers from 0 to 100, and another returns the even numbers from that list.
Solution Code: Solution-A27
Write a Python program to find the smallest number in a list without using min, and implement a function to generate a random list of numbers.
Solution Code: Solution-A28
Write a Python function that takes a parameter and returns the reverse of the given string without using string slicing.
Solution Code: Solution-A29
OK, in this course we are going to dive deeply into the Python fundamentals, but with a lot of examples and challenges.
After completing each section, you will receive an exercise pack, contains real world challenges. So, you can check your learning progress along the way.
Also, this course is packed with Smart Cheat Sheet. I have explained it completely in the first video.
So, even if you have taken other Python courses, you can still get benefits from the exercises alone in this course and also get the benefits of my idea, the Smart Cheat Sheet.
Here is a complete curriculum of this course:
Introduction
Download the Smart Cheat Sheet File
Installing Tools on Windows
Installing Tools on macOS
Installing Tools on Ubuntu
Are You Ready?
Print() Function
Sequence Characters
Variables
Constants
String Replication
Reading Input
Python Data Types
Arithmetic Operators
Operator Precedence
Type Casting
Exception Handling in Python
Decision Making
Built-In Functions vs. User-Defined Functions
String Built-In Functions
Declaring a User-Defined Function
User -Defined Functions with Parameter(s)
Date Format
Solution
Maximum Number
Solution #1
Solution #2
Odd or Even
Solution
Validate a Zip Code
Solution
Free Shipping Calculation
Solution
Write a Simple Calculator
Solution
Multiple Variable Assignment
Accessing Characters by Index Number
String Slicing
Returning Information From a Function
Returning Multiple Values From a Function
Default Argument Value
Pass Statement
Nested If Statements
Palindrome
Solution
Ignore Case-Sensitivity
Solution
Get the File Extension
Solution
Secure the Card Number
Solution
String Comparison
Solution
ATM Pin Code Validation
Solution
For Loop
range() Function
While Loop
Break a Loop
Else Clause on Loops
Nested Loops
List in Python
Built-In Functions Related to Lists
Iterating Over a List
Tuples
Iterating Over a Tuple
Sets in Python
Operations on Sets
Dictionary in Python
Iterating Over a Dictionary
Passing a List as Argument to a List
Returning a List From a Function
Generating a Random List
Draw a Triangle
Solution
Draw a Triangle by Using a While Loop
Solution
Draw a Triangle by Using a While Loop - Version 2
Solution
Divisible Numbers by 5 (For Loop)
Solution
Divisible Numbers by 5 (While Loop)
Solution
User-Defined Divisible Numbers (For Loop)
Solution
User-Defined Divisible Numbers (While Loop)
Solution
Check If a List is Empty
Solution
Append a List to Another One
Solution
Returning a Random Item From a List
Solution
Find Common Items
Solution
Find Even Items
Solution
Find the Smallest Number in a List
Solution
Reverse a String Without String Slicing
Solution
//-------------------------------------------------------------------------------------
Here is a complete Smart Cheat Sheet codes:
Smart Cheat Sheet Code: Table-String-Declaration
Smart Cheat Sheet Code: Table-Sequence-Characters
Smart Cheat Sheet Code: Example-Sequence-Characters
Smart Cheat Sheet Code: Table-Variable-Naming-Rules
Smart Cheat Sheet Code: Table-Keywords-List
Smart Cheat Sheet Code: Table-Arithmetic-Operators
Smart Cheat Sheet Code: Example-Arithmetic-Operators
Smart Cheat Sheet Code: Example-Constant
Smart Cheat Sheet Code: Example-String-Replication
Smart Cheat Sheet Code: Example-Input-Function
Smart Cheat Sheet Code: Example-DataTypes
Smart Cheat Sheet Code: Table-Operator-Precedence
Smart Cheat Sheet Code: Example-Operator-Precedence
Smart Cheat Sheet Code: Example-Type-Casting
Smart Cheat Sheet Code: Syntax_Exception_Handling
Smart Cheat Sheet Code: Syntax-If
Smart Cheat Sheet Code: Syntax-If-Else
Smart Cheat Sheet Code: Syntax-If-Elif
Smart Cheat Sheet Code: Syntax-If-Elif-Else
Smart Cheat Sheet Code: Example-Exception-Handling
Smart Cheat Sheet Code: Example-If-Statement
Smart Cheat Sheet Code: Table-Comparison-Operators
Smart Cheat Sheet Code: Table-Logical-Operators
Smart Cheat Sheet Code: Syntax-If-Statement
Smart Cheat Sheet Code: Table-String-Functions
Smart Cheat Sheet Code: Example-Len-Function
Smart Cheat Sheet Code: Example-Capitalize-Function
Smart Cheat Sheet Code: Example-Count-Function
Smart Cheat Sheet Code: Example-Lower-Upper-Function
Smart Cheat Sheet Code: Example-isSpace-Function
Smart Cheat Sheet Code: Example-Replace-Function
Smart Cheat Sheet Code: Example-Calculate_Circle_Area
Smart Cheat Sheet Code: Example-Calculate_Circle_Area_With_Parameter
Smart Cheat Sheet Code: Example-Print_Personal_Info
Solution Code: Solution-A3
Solution Code: Solution-A4
Solution Code: Solution-A5
Solution Code: Solution-A6
Solution Code: Solution-A7
Solution Code: Solution-A8
Solution Code: Solution-A9
Smart Cheat Sheet Code: Example-Multiple-Variable-Assignment
Smart Cheat Sheet Code: Example-Reverse-String
Smart Cheat Sheet Code: Example-Return-Value-1
Smart Cheat Sheet Code: Example-Return-Value-2
Smart Cheat Sheet Code: Example-Return-Value-3
Smart Cheat Sheet Code: Example-Return-Multiple-Values
Smart Cheat Sheet Code: Example-Default-Argument-Value
Smart Cheat Sheet Code: Example-Nested-If
Solution Code: Solution-A10
Solution Code: Solution-A11
Solution Code: Solution-A12
Solution Code: Solution-A13
Solution Code: Solution-A15
Solution Code: Solution-A16
Smart Cheat Sheet Code: Example-For-Loop
Smart Cheat Sheet Code: Example-Max-Ten-Numbers
Smart Cheat Sheet Code: Example-Range-Function-2
Smart Cheat Sheet Code: Example-Range-Function-3
Smart Cheat Sheet Code: Example-While-Loop
Smart Cheat Sheet Code: Example-While-Loop
Smart Cheat Sheet Code: Example-Loop-Else-Clause
Smart Cheat Sheet Code: Example-Loop-Else-Clause-2
Smart Cheat Sheet Code: Example-Multiplication-Table
Smart Cheat Sheet Code: Example-Access-List-Index
Smart Cheat Sheet Code: Example-Check_Item_In_List
Smart Cheat Sheet Code: Example-List-Slicing
Smart Cheat Sheet Code: Example-List-Length
Smart Cheat Sheet Code: Example-Inner-List
Smart Cheat Sheet Code: Example-List-Concatenate
Smart Cheat Sheet Code: Example-List-Update
Smart Cheat Sheet Code: Table-List-Functions
Smart Cheat Sheet Code: Example-List-All
Smart Cheat Sheet Code: Example-List-Any
Smart Cheat Sheet Code: Example-List-Append
Smart Cheat Sheet Code: Example-List-Insert
Smart Cheat Sheet Code: Example-List-Pop
Smart Cheat Sheet Code: Example-List-Clear
Smart Cheat Sheet Code: Example-List-Reverse
Smart Cheat Sheet Code: Example-List-Sort
Smart Cheat Sheet Code: Example-List-Sort-2
Smart Cheat Sheet Code: Example-List-Max-Min
Smart Cheat Sheet Code: Example-List-Iterate-For-Loop
Smart Cheat Sheet Code: Example-List-Iterate-While-Loop
Smart Cheat Sheet Code: Example-List-Iterate-Inner-List
Smart Cheat Sheet Code: Example-Tuple
Smart Cheat Sheet Code: Example-Tuple-In-Keyword
Smart Cheat Sheet Code: Example-Tuple-Slicing
Smart Cheat Sheet Code: Example-Tuple-Length
Smart Cheat Sheet Code: Example-Tuple-Concatenate
Smart Cheat Sheet Code: Example-Tuple-Inner-List
Smart Cheat Sheet Code: Example-Tuple-Unpack
Smart Cheat Sheet Code: Example-Tuple-For-Loop
Smart Cheat Sheet Code: Example-Tuple-While-Loop
Smart Cheat Sheet Code: Example-Set-Define
Smart Cheat Sheet Code: Example-Set-Length
Smart Cheat Sheet Code: Example-Set-For-Loop
Smart Cheat Sheet Code: Example-Set-Add
Smart Cheat Sheet Code: Example-Set-Remove
Smart Cheat Sheet Code: Example-Set-Clear
Smart Cheat Sheet Code: Example-Set-In-Not-In
Smart Cheat Sheet Code: Example-Set-Union
Smart Cheat Sheet Code: Example-Set-Union-Pipe
Smart Cheat Sheet Code: Example-Set-Intersection
Smart Cheat Sheet Code: Example-Set-Intersection-Ampersand
Smart Cheat Sheet Code: Example-Set-Difference
Smart Cheat Sheet Code: Example-Set-Difference-Minus
Smart Cheat Sheet Code: Example-Dictionary-Declaration
Smart Cheat Sheet Code: Example-Dictionary-Access-Item
Smart Cheat Sheet Code: Example-Dictionary-Delete-Item
Smart Cheat Sheet Code: Example-Dictionary-Length
Smart Cheat Sheet Code: Example-Dictionary-Keys
Smart Cheat Sheet Code: Example-Dictionary-Values
Smart Cheat Sheet Code: Example-Function-Print-Books
Smart Cheat Sheet Code: Example-Function-Return-List
Smart Cheat Sheet Code: Example-Random_Dice
Smart Cheat Sheet Code: Example-Random-List
Solution Code: Solution-A14
Solution Code: Solution-A17
Solution Code: Solution-A18
Solution Code: Solution-A19
Solution Code: Solution-A20
Solution Code: Solution-A21
Solution Code: Solution-A22
Solution Code: Solution-A23
Solution Code: Solution-A24
Solution Code: Solution-A25
Solution Code: Solution-A26
Solution Code: Solution-A27
Solution Code: Solution-A28
Solution Code: Solution-A30
Good Luck!
Beh