0% found this document useful (0 votes)
6 views10 pages

Python 30min Study Material

This document provides a 30-minute training material on Python basics, covering topics such as variables, data types, control structures, functions, lists, and dictionaries. It includes examples and simple exercises to reinforce learning. The training is designed for beginners and emphasizes Python's ease of use and versatility in various applications.

Uploaded by

Nasron Nasir
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)
6 views10 pages

Python 30min Study Material

This document provides a 30-minute training material on Python basics, covering topics such as variables, data types, control structures, functions, lists, and dictionaries. It includes examples and simple exercises to reinforce learning. The training is designed for beginners and emphasizes Python's ease of use and versatility in various applications.

Uploaded by

Nasron Nasir
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
You are on page 1/ 10

Python Basics

1
Training
30-Minute Study Material with Examples & Exercises

CADD TRAINING CENTRE (M) SDN BHD


2 Agenda

 - Introduction to Python
 - Variables & Data Types
 - Control Structures
 - Functions
 - Lists & Dictionaries
 - Simple Exercises

CADD TRAINING CENTRE (M) SDN BHD


3 Introduction to Python

 • Python is an interpreted, high-level programming


language.
 • Easy to learn and widely used in data science, AI,
web development.
 • Open-source and cross-platform.

CADD TRAINING CENTRE (M) SDN BHD


4 Variables & Data Types

 Examples:
 name = 'Alice'
 age = 25
 height = 5.6
 is_student = True

 Common Data Types:


 - int, float, str, bool, list, dict

CADD TRAINING CENTRE (M) SDN BHD


5 Control Structures

 if-else statements
 for loops
 while loops

 Example:
for i in range(5):
print(i)

CADD TRAINING CENTRE (M) SDN BHD


6 Functions

 Functions are reusable blocks of code.

 Example:
def greet(name):
return f'Hello {name}'
print(greet('Alice'))

CADD TRAINING CENTRE (M) SDN BHD


7 Lists & Dictionaries

 Lists:
 numbers = [1,2,3,4]

 Dictionaries:
 student = {'name':'Alice','age':25}

 print(numbers[0])
 print(student['name'])

CADD TRAINING CENTRE (M) SDN BHD


8 Exercises

 1. Create a variable 'x' with value 10 and print it.


 2. Write a loop to print numbers from 1 to 10.
 3. Write a function that takes 2 numbers and returns
their sum.
 4. Create a list of 5 fruits and print the 2nd fruit.
 5. Create a dictionary with keys: name, age, course.

CADD TRAINING CENTRE (M) SDN BHD


9

Q&A
10

THANK YOU

You might also like