Python is a cross-platform, object-oriented programming language (♦ See DEF.), created in 1991.
It allows to create, among other things, Web applications, softwares and scripts system.
→ Let's start with very simple codes. The more you progress, page after page, the more sophisticated the scripts will be. However, you must go over 30 to 40 pages per level, before moving on to the next step...
→ In order to evaluate your codes, click on the icon on the left at the bottom of the page (gears), then choose a compiler from the list that will be open in another tab. Finally, test your work.
NOW REPRODUCE AND IMMERSE YOURSELF!
C 0001 - Hello World !
C 0002 - Variables
var_1 = "Hello" var_2 = "People" print(var_1) print(var_2)
C 0003 - Numbers
a = 33 b = 48 if b > a: print("b est plus grand que a")
C 0004 - Exit From A Loop
a = 1 while a < 6: print(a) if (a == 4): break a+= 1
C 0005 - List
thislist = ["car", "plane", "truck", "boat", "train"] print(thislist)
C 0006 - List And Change Of Value
thislist = ["train", "car", "plane"] thislist = "tank" print(thislist)
C 0007 - Booleans
a = 400 b = 600 if b > a: print("b est plus grand que a") else: print("b n'est pas plus grand que a")
C 0008 - Numbers
w = 1800 x = 200 y = 12.8 z = 1j print(type(w)) print(type(x)) print(type(y)) print(type(z))
C 0009 - Loops (while)
i = 1 while i < 120: print(i) i += 10
C 0010 - Loops (for)
for x in "plane": print(x)
C 0011 - Loops (while)
i = 1 while i < 22: print(i) if (i == 6): break i += 4
C 0012 - If... Else
a = 128 b = 420 if b > a: print("b is bigger than a")
CHOOSE YOUR COMPILER
Reproduce this code, choosing one of the compilers below (♦ see DEF) (don't copy-paste! It would be too easy). They have the same use, just pick up one according to your preferences.
When you copy your code, replace the existing code (by default) with your own.
Warning ! For some of these compilers, you might have to choose the programming language yourself, in a specific menu which is offered to you. Of course, don't forget to click on RUN !
Python Technical Specifications
Most Recent Versions
Tools And Methodologies
* Created by Guido van Rossum
* Developed by Python Software Foundation
* Influenced by Java
* Free license (Python Software Foundation License)
» Python from the Very Beginning
⇒ Official Website
» Apprenez à programmer en Python
Vincent le Goff
2016 - 3ème édition
⇒ Éditions Eyrolle