This file contains hidden or 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 os | |
| import numpy as np | |
| from numpy import random | |
| import time | |
| from time import sleep | |
| import shutil | |
| userNumber = input("Guess the number or your Windows will die.") | |
| realNumber = random.randInt(1000000000) |
This file contains hidden or 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
| vacío principal() { | |
| meGustanLasVerduras = falso; | |
| si (meGustanLasVerduras = verdadero) { | |
| imprime("Bravo! Haces un buen trabajo"); | |
| } sino { | |
| imprime("Enserio, BluePy, come tus benditas verduras."); | |
| } | |
| // This is not meant to be discriminatory, it's just something a little bit unheard of that might make code harder to read. |
This file contains hidden or 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
| def player_count(game_players): | |
| players = ["You", "Me"] | |
| return players | |
| print("Player count: ", player_count(players) | |
| # This possibly doesn't work. |
This file contains hidden or 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
| ;; A function (non-interactable) that will calculate the area of a triangle (plus a message by you) | |
| (defn triangle [message] | |
| (println "Result: ") | |
| (let [b 8 h 7] (/ (* b h) 2))) | |
| (str message)) | |
| (triangle "This is fun!") |
This file contains hidden or 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
| ;; A function that will just sum and print some line. | |
| (defn sum-print [message] | |
| (str message (+ 6 12))) | |
| (sum-print "I love Lisp and its Dialects") | |
| ;; A function that will print a normal text and a reverse version | |
This file contains hidden or 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
| for i in range(1000000): | |
| print(i) | |
| # Man if your toaster survives good job | |
| nn = 69 | |
| # For your sanity nn is nerdNumber | |
| if nn > 0: | |
| print("It's equal than 0.") |
This file contains hidden or 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
| ;; A function that will tell you nice things for some reason | |
| (defn nice [nice_word] | |
| (str "You are " nice_word)) | |
| (nice "intelligent") | |
| ;; A function that will tell you your country | |
| (defn country [country] |
This file contains hidden or 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 'dart:io'; | |
| void main() { | |
| print("First number: "); | |
| firstNumber = stdin.readLineSync(); | |
| print("Reading..."); | |
| sleep(Duration(seconds: 1)); | |
| print("Done!"); | |
| print("Second number: "); | |
| secondNumber = stdin.readLineSync(); |
This file contains hidden or 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
| ;; Example in docs | |
| (defn greet [name] | |
| (str "Hello, " name)) | |
| ;; My first ever function (very neat) | |
| (defn selfgrade [grade] | |
| (str "Your own grade: " grade)) | |
| ;; Calling your function | |
| (selfgrade "10") |