0% found this document useful (0 votes)
7 views

Python Beginner Course

this will help you to learn python basics

Uploaded by

Co C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Python Beginner Course

this will help you to learn python basics

Uploaded by

Co C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Python Beginner's Course

1. Introduction to Python

- What is Python?

Python is a high-level programming language known for its simplicity and readability.

It can be used for web development, data analysis, automation, AI, and more.

2. Setting Up Python

- How to install Python and run your first program: print("Hello, World!")

3. Basic Syntax

- Introduction to printing with the print() function.

- Understanding how to write and run code in Python.

4. Variables and Data Types

- Variables store data that can be used later in the program.

- Common Data Types:

- String: Text enclosed in quotes ("Hello").

- Integer: Whole numbers (5, 10, -3).

- Float: Decimal numbers (3.14, 2.0).

- Boolean: True or False.

Example of variable assignment:

name = "Fahad"

age = 15

height = 5.8
is_student = True

5. Basic Operations

- Arithmetic Operations:

- Addition: +

- Subtraction: -

- Multiplication: *

- Division: /

Example:

x = 10

y=5

print(x + y) # Addition

print(x - y) # Subtraction

print(x * y) # Multiplication

print(x / y) # Division

- String Operations:

- Concatenation: Combining strings with +

Example:

greeting = "Hello, " + "Fahad!"

print(greeting) # Output: Hello, Fahad!

6. Practice Exercises

- Create variables for your name, age, and favorite food.

- Perform basic arithmetic and print the result.


- Combine strings to make a sentence with your variables.

You might also like