0% found this document useful (0 votes)
11 views2 pages

Python Lessons Styled

The document outlines the first day of Python beginner lessons, covering essential concepts such as running code, variables, basic math operations, if statements, for loops, functions, and while loops. It includes examples for each concept and introduces a mini project for creating a simple calculator. Key takeaways include the importance of variables for data storage, loops for task repetition, and functions for code reusability.

Uploaded by

asekalydia
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Python Lessons Styled

The document outlines the first day of Python beginner lessons, covering essential concepts such as running code, variables, basic math operations, if statements, for loops, functions, and while loops. It includes examples for each concept and introduces a mini project for creating a simple calculator. Key takeaways include the importance of variables for data storage, loops for task repetition, and functions for code reusability.

Uploaded by

asekalydia
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python Beginner Lessons — Day

1 Summary

1. Running Your First Python Code


You learned how to run Python code using Programiz. First code:
print("Hello, Python!")

2. Variables
Variables store information.
Example:
name = "Augustine"
age = 15

3. Basic Math
Python can add, subtract, multiply, divide.
Example:
a = 10
b=3

4. If Statements
Programs make decisions using if-statements.
Example:
if age >= 18:
print("Adult")

5. For Loops
Repeat actions a set number of times.
Example:
for i in range(5):
print(i)
6. Functions
Functions are reusable blocks of code.
Example:
def greet():
print("Hello")

7. Functions with Parameters


Functions can accept input.
Example:
def greet(name):
print("Hello", name)

8. Mini Project: Simple Calculator


Your first project using input + function.

9. For Loop with Input


Program loops from 1 to user’s number.

10. While Loops


Repeats while a condition remains true.
Example:
count = 1
while count <= 5:
count += 1

Concept What You Learned


Variables Store data like names or numbers
Loops Repeat tasks automatically
Functions Reusable pieces of code

You might also like