Intro To Python
Intro To Python
2
9
7 4
6
3
5
What is Python?
• Python is an interpreted, object-oriented, high-level
programming language.
• Python byte code is executed in the Python interpreter
(similar to Java) -> platform independent.
• It was created by Guido van Rossum and released in
1991.
8
2
9
7 4
6
3
5
Why use Python?
• Readable and Maintainable Code
• Compatible with Major Platforms and Systems
• Robust Standard Library
• Many Open Source Frameworks and Tools
• Simplify Complex Software Development
• Web Applications
• Script for Vulnerability Testing
• For Data Science and Data Visualization
• Machine Learning
8
7 4
6
3
5
8
7 4
5
How to execute Python code?
• IDLE (IDLE is Python's Integrated Development and
Learning Environment)
• Execute via Command Line (Windows)
• Utilize Online Python Interpreter
(onlinegdb.com/online_python_interpreter)
8
5
Indentation
• Python uses indentation to indicate code block.
Example:
8
6
Variables
• Variables are containers for
storing data values.
• A variable is created the
moment you first assign a
value to it.
8
7
Data Types
• Type of data stored in a
variable
• String
• Integer
• Float
• Boolean
• Bytes
8
9
Casting
• Converting one data type
to another is known as
casting.
9
Day 1: Activity #1
1. Create 5 Variables (Name (string),Math Grade (float),Science
Grade (float), English Grade (integer),Status (string))
2. Assign appropriate value
3. Display the result:
Name: __________
Math Grade:_____________
Science Grade:___________
English Grade:___________
Status:______________
4. Screenshot the code and use the filename:
lastname_firstname_activity1.png/jpeg
9
input() Function
• Accepts user’s input
name = input(“Enter Full Name: ”)
email = input(“Enter Email: ”)
print(“Name: ” + name)
print(“Name: ” + email)
Day 1: Activity #2
1. Create 5 Variables and use input function to accept (Name
(string),Math Grade (float),Science Grade (float), English Grade
(integer),Average(float))
2. Assign appropriate value
3. Display the result:
Name: __________
Math Grade:_____________
Science Grade:___________
English Grade:___________
Average:______________
4. Screenshot the code and use the filename:
lastname_firstname_activity2.png/jpeg
THANK
YOU!