This file contains 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 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 = ""; |
This file contains 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 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<>(); |
This file contains 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
<!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"> |
This file contains 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
# 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.") |
This file contains 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
# 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 |