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
#!/usr/bin/env zsh | |
git show-branch -a \ | |
| grep '\*' \ | |
| grep -v `git rev-parse --abbrev-ref HEAD` \ | |
| head -n1 \ | |
| sed 's/.*\[\(.*\)\].*/\1/' \ | |
| sed 's/[\^~].*//' | |
# How it works: |
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
# Place de cinema | |
# recolter l'age de la personne "Quel est votre age ?" | |
age = int(input("Quel est votre age ?")) | |
# si la personne est mineur -> 7€ | |
if age < 18: | |
prix_total = 7 | |
# si la personne est majeur -> 12€ | |
else: |
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 | |
snake_jar = random.randint(1, 5) | |
choice = int(input("Choisit une jarre : 1, 2, 3, 4, 5")) | |
if choice == snake_jar: | |
print("Perdu ! vous tombez dans le piège !") | |
else: | |
print("Gagné ! vous avez obtenu une clé !") |
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
package fr.gravendev.ex; | |
public class Jouet implements Comparable<Jouet> { | |
// attributs de notre classe | |
private String nom; // nom du jouet | |
private int prix; // prix du jouet | |
private String description; // description du jouet | |
private int promo; // promotion du jouet en cours |
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
package fr.gravendev.ex; | |
public class Jouet implements Comparable<Jouet> { | |
// attributs de notre classe | |
private String nom; // nom du jouet | |
private int prix; // prix du jouet | |
private String description; // description du jouet | |
private int promo; // promotion du jouet en cours |
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
package exo2; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
public class Main { | |
public static void main(String[] args) { | |
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
void setup() | |
{ | |
pinMode(13, OUTPUT); // led 1 : rouge | |
} | |
void loop() | |
{ | |
digitalWrite(13, HIGH); // allume la led rouge | |
delay(2000); | |
digitalWrite(13, LOW); // eteindre la led ROUGE |
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
# afficher un message de bienvenue | |
print("Bienvenue au cinema, voici les films à l'affiche: ") | |
# cette liste de films | |
films = ["Voyage au centre du HTML", "Les 9 jsons cachés", "Algobox - le film"] | |
# afficher chaque film | |
for numero, film in enumerate(films, start=1): | |
print("Film n°", numero, "nom:", film) |
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
#include <iostream> | |
using namespace std; | |
int main() { | |
cout << "Bienvenue à la chocolaterie" << endl; | |
// production de chocolat noir par minute | |
int productionChocolatNoir = 117; | |
// production de chocolat blanc par minute |
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"> |
OlderNewer