programming:python:python
This is an old revision of the document!
Table of Contents
Hello world !
Exercice 1 : print
- Open a terminal
- Create your file by writing the following command
vim ex1.py
- Enter insertion mode by pressing Insert
- Write the line below
print("Hello world !")
- Then press Esc key
- Save the file
- Execute
python3 ex1.py
Exercice 2 : input
- Open a terminal
- Create your file by writing the following command
vim ex2.py
- Enter insertion mode by pressing Insert
- Write the line below
prenom = input('Salut! Quel est ton prénom ?\n') nom = input('Et ton nom alors ?\n') print("Salut " + prenom + " " + nom)
- Then press Esc key
- Save the file
- Execute
python3 ex2.py
programming/python/python.1669804232.txt.gz · Last modified: 2022/11/30 10:30 by ateixeira