Rename files, add headers, fix typos in 13
This commit is contained in:
parent
a6b4a427e0
commit
954069159a
8 changed files with 31 additions and 2 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problem 11
|
||||||
|
|
||||||
def cross(rounds, bank1, boat, bank2):
|
def cross(rounds, bank1, boat, bank2):
|
||||||
if bank1["Missionaries"] + bank1["Cannibals"] == 0 and boat["Missionaries"] + boat["Cannibals"] == 0:
|
if bank1["Missionaries"] + bank1["Cannibals"] == 0 and boat["Missionaries"] + boat["Cannibals"] == 0:
|
||||||
return "Journey complete"
|
return "Journey complete"
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
def createTriange(numRows):
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problem 13
|
||||||
|
|
||||||
|
def createTriangle(numRows):
|
||||||
if numRows < 0:
|
if numRows < 0:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
|
@ -36,6 +40,6 @@ def factorial(number):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
createTriange(10)
|
createTriangle(10)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problem 3
|
||||||
|
|
||||||
import turtle
|
import turtle
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problem 4
|
||||||
|
|
||||||
import turtle
|
import turtle
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problems 6 and 12
|
||||||
|
|
||||||
import turtle
|
import turtle
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problem 7
|
||||||
|
|
||||||
import turtle
|
import turtle
|
||||||
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problem 8
|
||||||
|
|
||||||
import turtle
|
import turtle
|
||||||
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Runestone.Academy thinkcspy course
|
||||||
|
# Chapter 16
|
||||||
|
# Problems 9 and 10
|
||||||
|
|
||||||
def fillJug(rounds, jugA, jugB, target):
|
def fillJug(rounds, jugA, jugB, target):
|
||||||
pour = 0
|
pour = 0
|
||||||
Loading…
Reference in a new issue