This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# importer le module sense hat | |
from sense_hat import SenseHat | |
import math | |
# creer une variable qui va stocker la couleur bleu | |
blue_color = [27, 176, 241] | |
orange_color = [241, 69, 27] | |
black_color = [0, 0, 0] | |
# creer une variable sense_hat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<!-- Tete de la page qui contient les métadonnées --> | |
<head> | |
<title>Jeu du bonneteau</title> | |
<!-- lier la page html avec la feuille de styles css --> | |
<link rel="stylesheet" type="text/css" href="css/styles.css"> | |
</head> | |
<!-- Corp de la page --> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math # differents calculs mathematiques | |
import time # gerer le temps | |
# créer une classe qui va gerer la notion de lave linge | |
class LaveLinge: | |
# creer le constructeur | |
def __init__(self, tours_minutes=1400, contenance_kg=8): | |
self.tours_minutes = tours_minutes | |
self.contenance_kg = contenance_kg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nom FROM cheval | |
SELECT nom, prenom FROM jockey | |
INSERT INTO cheval("nom", "sexe", "poid") VALUES("Digital Phoenix", "M", 532) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class Main { | |
public static void main(String[] args) { | |
// exercice niveau 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# créer une fonction afficher_parking pour afficher le status de chaque emplacement | |
def afficher_parking(): | |
# boucle parcourir chaque emplacement pour afficher la disponibilité | |
for num_etage, etage in enumerate(parking, start=1): | |
for num_place, place in enumerate(etage, start=1): | |
# nom_variable = (condition_faux, condition_vrai)[condition à verifier] | |
resultat = ("Non Disponible", "Disponible")[place == 'D'] | |
print("Etage n° -", num_etage, " place n°", num_place, resultat) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nom FROM planete | |
SELECT temperature FROM planete WHERE nom = "Mars | |
INSERT INTO planete("id", "nom", "temperature", "distancesol", "diametre") VALUES(9, "Nebula", 1500, 123000, 472000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
public class Livre { | |
// attributs | |
// nom du livre | |
// liste de pages | |
private String nomLivre; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
# liste stockant le nom de chaque fruit | |
fruits = ["ananas", "cerise", "orange", "pasteque", "pomme_dore"] | |
# choix au hasard | |
hasard = random.choices(fruits, k=3) | |
print(hasard) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Générateur de citations</title> | |
<meta charset="utf-8"/> | |
</head> | |
<body> | |
<h1 id="citation">Une variable c'est quelque chose qui peut varier</h1> | |
<img id="avatar" alt="Avatar de Graven" src="http://graven.yt/graven.jpg"> |