Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .learn/vscode_queue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"initializing","time":3295799.122},{"name":"reset","time":3295833.506},{"name":"configuration_loaded","time":3301796.973},{"name":"start_exercise","time":3323127.58,"data":"00-welcome"},{"name":"start_exercise","time":3910859.008,"data":"01-first-app"},{"name":"start_exercise","time":3887281.973,"data":"00-welcome"}]
19 changes: 19 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// JavaScript file
function generateExcuse() {
let who = ['the dog', 'my grandma', 'his turtle', 'my bird'];
let what = ['ate', 'pissed on', 'crushed', 'broke'];
let when = ['before the class', 'right in time', 'when I finished', 'during my lunch', 'while I was praying'];

// Generate a random index for each list
let whoIndex = Math.floor(Math.random() * who.length);
let whatIndex = Math.floor(Math.random() * what.length);
let whenIndex = Math.floor(Math.random() * when.length);

// Concatenate the elements to form the excuse
let excuse = `${who[whoIndex]} ${what[whatIndex]} ${when[whenIndex]}`;
return excuse;
}

// Print excuse
console.log(generateExcuse());

3 changes: 3 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python file
excuse = "The dog ate my homework when I finished"
print(excuse)