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
// Returns the number of iterations to get from n to 1 | |
// when following the sequence that forms the basis of the | |
// Collatz conjecture (https://en.wikipedia.org/wiki/Collatz_conjecture) | |
func collatz(_ n : Int) -> Int { | |
if n == 1 { | |
// end at 1 | |
return 0 | |
} | |
else if n % 2 == 0 { | |
// even |
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 xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>For Sale</title> | |
<link rel="stylesheet" type="text/css" href="for_sale.css" /> | |
</head> | |
<body> | |
<div class='item'> | |
<img src='https://photos-1.dropbox.com/si/shg_178/m9yzvifJIwqvXx2eF95UrJWzMZx87t-Vu3TvPwsLdJA/360874/1344034800/6555318/Bunk%20bed%202.JPG?prep_size=1280x960%2C32bf'/> |