Python Introduction
Python Introduction
Diagnostic Test
1. Python is a ________ level programming language.
a) Low-level b) Assembly c)High-level
2. What is the name of the environment in Python that write your programs
and then test them out.
a) Shell b) IDLE c) Window
3. ___________ function in python show output on screen.
a) input b) print c) put
4. _________ data type is used to store and represent text-based
information.
a) int b) float c) string
5. ___________ are used to store data in the memory.
a) variables b)keywords c)identifiers
Python - Introduction
Diagnostic Test(Answers)
1. Python is a ________ level programming language.
a) Low-level b) Assembly c)High-level
2. What is the name of the environment in Python that write your programs
and then test them out.
a) Shell b) IDLE c) Window
3. ___________ function in python show output on screen.
a) input b) print c) put
4. _________ data type is used to store and represent text-based
information.
a) int b) float c) string
5. ___________ are used to store data in the memory.
a) variables b)keywords c)identifiers
Python, IDLE and your first program
Learning Objective:
Understand about programming language and Python
L
Python-
Keywords: Introduction
1. Programming language
2. IDLE
3. Python Shell
4. Interactive mode
5. Script mode
6. print()
7. Syntax error
8. Prompt - >>>
What Is Python?
Interactive Script
Interactive mode vs Script
Interactive modemode Script mode
Suitable for small programs and for Suitable for large programs and for
beginners experts
Code cannot be saved and used in Code can be saved and can be used
the future. in the future.
We get output for every single line Entire program is first compiled and
of code then executed.
Print()
Print() function is used to display information to the
user, you must use the print command.
You must ALWAYS open and close the PARANTHESIS.
Syntax error
Syntax Error: When you break the rules of the
programming language.
• Print(“Welcome Tom”)
• print(“Football”
• print(Dancing)
Incorrect code Correct code
• print(“Football” print(“Football”)
• print(Dancing) print(“Dancing”)
My first Program
Program 1: The computer must display the words
HELLO WORLD
The code for this is:
HELLO WORLD
The code for this is:
Interactive Script