Skip to content

Instantly share code, notes, and snippets.

@jerzyyy
jerzyyy / gist:f2ebe1a789609748951aaaf05c5bab49
Created September 6, 2018 15:35
Explorer l'arborescence avec le terminal
Last login: Thu Sep 6 13:39:02 on ttys000
MacBook-Pro-de-JERZY:~ jerzy$ ls
Applications Documents Library Music Public
Desktop Downloads Movies Pictures
MacBook-Pro-de-JERZY:~ jerzy$ ls Downloads/
1280x800_one-piece-ace.jpg
1280x800_roronoa-zoro-with-swords-one-piece.jpg
Copie de Atelier_responsive.docx
Copie de Copie de logo.png
Copie de Copie de socks_harry.jpeg
debut bonbon (prix, argent)
bonbon= 0 argent= 12,47 prixx= 1,14
Tant que argent - prix > 0
argent <- argent - prix
bonbon <- bonbon + 1
Fin de tant que
Si argent<= 0 et prix<= 0
Retourner 0
fin bonbon
const Name = 'Django';
const Producer = 'Tarantino';
const date = '2012'
const message = Name + ' réalisé par ' + Producer + ' est sorti en ' + date;
alert(message);
variables
i <- 0
nbsaisi
Debut
lire nbsaisi
tant que i < nbsaisi
retourne « Bienvenue a la Wild »
i++
const reponse = prompt("Hey mon ami ! Tu aimes ça les patates ?");
let a = ``
if (reponse === "oui") {
for (i = 0; i < 7; i++)
a = a + '#'
console.log(a)
} else if (reponse === "non") {
alert(`dommage`);
} else {
alert(`Je vous sens comme tiraillé`);
const reponse = prompt("Hey mon ami ! Tu aimes ça les patates ?");
let a = ``
if (reponse === "oui") {
for (i = 0; i < 7; i++) {
a = a + '#'
console.log(a);
}
} else if (reponse === "non") {
alert(`dommage`);
} else {
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('How old are you ? ')
process.stdin.on('data', (number) => {
if (number <= 99 && Math.abs(number)) {
console.log(2018 - Math.abs(number))
}
process.exit()
})
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('How old are you? ')
process.stdin.on(('data', (text) => {
if (text == number && text >= 0 && text <= 99) {
console.log(2018 - text)
} else {
console.log('not valid')
}
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('how old are you? ')
process.stdin.on('data', (text) => {
text = parseInt(text)
let date = new Date()
let year = date.getFullYear()
if (text != NaN && text >= 0 && text <= 99)
console.log(year - text)
@jerzyyy
jerzyyy / cowsay
Created September 24, 2018 12:30
const cowsay = require("cowsay");
console.log(cowsay.say({
text: "Hello boy",
e: "oO",
T: "U",
}))