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
| ;; New line generated | |
| (println "Hello World!") | |
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
| int anInteger = 251; | |
| float aFloat = 2.51045; | |
| string aString = "Yo mama"; | |
| char aCharacter = "b"; | |
| bool aBoolean = true; | |
| Console.WriteLine($"Integer: {anInteger}"); | |
| Console.WriteLine($"Float: {aFloat}"); | |
| Console.WriteLine($"String: {aString}"); | |
| Console.WriteLine($"Character: {aCharacter}"); |
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
| # Average for statement | |
| myArray = ["yes", "no", "maybe"] | |
| for m in myArray: | |
| print(m, len(myArray), myArray) | |
| # Range | |
| for i in range(251): | |
| print(i) | |
| print("I am not responsible for your device burning somehow") | |
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
| package main | |
| import "fmt" | |
| func main() { | |
| fmt.Println("Welcome.") | |
| var apples int | |
| fmt.Println("Please enter a number.") | |
| fmt.Scan(&apples) | |
| if apples <= 10 { |
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 numpy as np | |
| print("Generating array...") | |
| array = np.random.choice(np.arrange(0,1000000), replace = False, size = (10, 10)) | |
| print(array) | |
| print("Hope it is unique enough!") |
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
| use std::io; | |
| use rand::Rng; | |
| use std::cmp::Ordering; | |
| fn main() { | |
| println!("Guess the number!"); | |
| let secret_number = rand::thread_rng().gen_range(1..=100); | |
| loop { | |
| println!("The secret number is: between 1-100 and randomly generated!"); |
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() { | |
| var word = "Random"; | |
| print("Guess the word!"); | |
| String? userGuess = stdin.readLineSync(); | |
| if (userGuess != null) { | |
| if (userGuess == word) { | |
| print("Congrats, the word was Random!"); | |
| } else if (userGuess != word) { |
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
| print("Welcome!") | |
| guess = input("Guess the Word! (Clue: It has 9 letters) (Capitalized) ") | |
| word = "Brilliant" | |
| if guess == word: | |
| print(f"Congratulations, {word} was the word!") | |
| else: | |
| print(f"Sorry, {guess} wasn't the word.") | |
| print("Now we will do some maths! (very simple actually)") | |
| userNum = input("What is the result of '24 * 58 / 5 + 251'? ") |
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("Number 1: "); | |
| String? number1 = stdin.readLineSync(); | |
| print("Analyzing..."); | |
| sleep(Duration(seconds: 5)); | |
| print("Done!"); | |
| sleep(Duration(seconds: 1)); | |
| print("Number 2: "); |
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
| #include <iostream> | |
| int main() { | |
| std::cout << "Hello World!"; | |
| return 0; | |
| } | |