Skip to content

Instantly share code, notes, and snippets.

View SiAust's full-sized avatar
🏠
Open to new opportunities

Simon Aust SiAust

🏠
Open to new opportunities
View GitHub Profile
@SiAust
SiAust / IsLeapYear.java
Created March 23, 2019 15:31
Takes an input year and returns whether the year is a leap year.
public class NumberOfDaysInMonth {
public static boolean isLeapYear(int year){
boolean isLeapYear = false;
if (year < 1 || year > 9999){
return false;
}
if (year % 4 == 0){
@SiAust
SiAust / interactive_loop.py
Last active July 22, 2018 10:20
An interactive loop in python. Takes user input to exit the loop.
"""A short program using user input in an interactive loop"""
q = False
while not q:
user_quit = input('Quit?(y/n): ')
if user_quit == 'y':
q = True