L1- python
L1- python
1
Why Python?
1 Computer program that translates and executes the commands that users introduce.
3
Python installation
https://www.anaconda.com/download
4
Spyder
Spyder is an open source, cross-platform integrated development
environment (IDE) for scientific programming in the Python language.
5
Hello world
Generally when you introduce a program language, you do "hello world".
Python print() function prints the message to the screen or any other
standard output device.
6
Compiler
algorithm ComputeAge /* Program to compute a person’s age */
Libraries
7
Interpreter
algorithm ComputeAge """
Program to compute a person’s age
var
BirthYear: integer """
endvar
birthYear = int(input(“Write your Birth year:"))
Read (BirthYear)
age = 2025 - birthYear
Age ß 2025 – BirthYear
if (age >= 18):
if (Age >= 18) print("Legal age \n")
write(“Legal age”) else:
Else print(“Minor \n");
write(“Minor”)
endif Program run command by command
endAlgorithm
8
Compiled vs Interpreted
Compiled Interpreted
9
Python properties
11
Disadvantages of Python
12