Skip to content

Instantly share code, notes, and snippets.

View mreed4's full-sized avatar

Matthew Reed mreed4

View GitHub Profile
@mreed4
mreed4 / PersonalDetails.java
Created December 10, 2023 04:36
MOOC.fi - PersonalDetails - Solution 2
import java.util.ArrayList;
import java.util.Scanner;
public class PersonalDetails {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int sum = 0;
String longestName = "";
@mreed4
mreed4 / PersonalDetails.java
Created December 10, 2023 04:09
MOOC.fi - PersonalDetails - Solution 1
import java.util.ArrayList;
import java.util.Scanner;
public class PersonalDetails {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
ArrayList<Integer> birthYears = new ArrayList<>();
ArrayList<Integer> nameLengths = new ArrayList<>();
@mreed4
mreed4 / index.html
Created May 20, 2021 22:55
HTML5 Boilerplate - No jQuery, no Bootstrap, async, responsive ready
<!doctype html>
<html lang="en">
<head>
<title>Title</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="css/styles.css">
@mreed4
mreed4 / OddOrEven.py
Created February 13, 2021 04:37
Exercise 2 from PracticePython.org
# http://www.practicepython.org/exercise/2014/02/05/02-odd-or-even.html
# Ask the user for a number. Depending on whether the number is even or odd, print out an appropriate message to the
# user. Hint: how does an even-odd number react differently when divided by 2?
# Note to self: This required you looking at the solution
# Greet user
print("\nGreetings, user.")
@mreed4
mreed4 / CharacterInput.py
Last active February 13, 2021 04:36
Exercise 1 from PracticePython.org
# http://www.practicepython.org/exercise/2014/01/29/01-character-input.html
# Create a program that asks the user to enter their name and their age. Print out a message addressed to them that
# tells them the year that they will turn 100 years old.
# Get current year
import datetime
date = datetime.datetime.now()
year = date.year