Skip to content

Instantly share code, notes, and snippets.

View BluePyTheDeer251's full-sized avatar

BluePy BluePyTheDeer251

View GitHub Profile
@BluePyTheDeer251
BluePyTheDeer251 / whatisthis.rs
Last active October 10, 2024 16:20
Writing Hello World in different languages. (Rust Edition)
fn main() {
println!("Hello World!");
}
@BluePyTheDeer251
BluePyTheDeer251 / drivetest.py
Last active October 22, 2024 17:54
A simple thing I did when bored
def canDrive():
age = input("What's your age? ")
if int(age) >= 18:
print(True)
else:
print(False)
canDrive()
@BluePyTheDeer251
BluePyTheDeer251 / gradecheck.dart
Last active October 15, 2024 17:25
A grade checker in Dart
import 'dart:io';
void main() {
gradeCheck() {
stdout.write("What is your grade, from 0-10?");
String? grade = stdin.readLineSync();
if (grade != null); {
int totalGrade = int.parse(grade!);
if (totalGrade == 0) {
print("You failed the test, try harder next time!");
@BluePyTheDeer251
BluePyTheDeer251 / gradecheck.py
Last active October 21, 2024 17:23
A grade checker that ACTUALLY works in Python.
def gradeCheck():
grade = input("What grade did your get? (0-10): ")
if int(grade) == 0:
print("You failed the exam, better luck next time!")
elif int(grade) <= 5:
print("You still didn't pass but did decent.")
elif int(grade) < 10:
print("Nice job! You passed!")
if int(grade) == 10:
print("And you got a 10! Keep up that good job!")
@BluePyTheDeer251
BluePyTheDeer251 / stupidcounter.cs
Created October 16, 2024 01:33
A stupid C# terminal app that will just tell you stuff based on the number you write.
var number = input("Please type a number, any number. ('Till 1M)");
if (number == 0) {
print("Why 0?");
} else if (number <= 10) {
print("Nice number, it's small.");
} else if (number <= 100) {
print("Starting to get somewhat big.");
} else if (number <= 1000) {
print("Going up.");
@BluePyTheDeer251
BluePyTheDeer251 / hi.cpp
Created October 17, 2024 15:10
A Hello World in C++ to mark the start of my learning
#include <iostream>
int main() {
std::cout << "Hello World!";
return 0;
}
@BluePyTheDeer251
BluePyTheDeer251 / arrays.dart
Last active November 3, 2024 23:05
Array Generator in Dart.
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: ");
@BluePyTheDeer251
BluePyTheDeer251 / game.py
Created October 21, 2024 17:41
A simple game in Python.
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'? ")
@BluePyTheDeer251
BluePyTheDeer251 / guess.dart
Created October 24, 2024 19:46
A guess the word game in Dart
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) {
@BluePyTheDeer251
BluePyTheDeer251 / guessnum.rs
Last active October 28, 2024 00:56
A randomly generated "Guess the number!" game in Rust, following the guide on "The Book" (I am loving it)
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!");