Ryan: Introduction to Computational Reasoning Fall 2025
A very short flash at just the right moment.
And for slow motion video, a lot of very quick flashes in a sequence.
It's just
some food,
some games, and some dancing.
No biggie.
cheese
menu
chop veggies
toothpicks
rap
jazz
DJ
menu
appetizers
plates
forks
table cloth
board games
napkins
cards
chicken
kebabs
cleanup
shopping
spices
invites
games
condiments
snacks
cook
food
music
rock
cheese
menu
chop veggies
toothpicks
rap
jazz
DJ
menu
appetizers
plates
forks
table cloth
board games
napkins
cards
chicken
kebabs
cleanup
shopping
spices
invites
games
condiments
snacks
cook
food
music
rock
cheese
menu
chop veggies
toothpicks
rap
jazz
DJ
setup
appetizers
plates
forks
table cloth
board games
napkins
cards
chicken
kebabs
cleanup
shopping
spices
invites
games
condiments
snacks
cook
food
music
rock
To look up "concatenate" in the dictionary I open the dictionary to about the middle and look at the page. Determine whether the target word is in front, behind, or actually on the page I am looking at. If it is on this page, scan until I find it. If it is in front of this page I take the pages of the first half of the dictionary and let them fall open to about the middle. I look at the page I am on and if the target word is there I scan to locate it. Otherwise I figure out if it is in front of behind where I am. I then repeat this technique for the pages in front or behind.
split pages about half-way if target word on page done otherwise if before grab front half of pages else grab back half of pages repeat
Instruct a Robot to Find the Largest Card
The robot can only
Point at the cards as card1, card2, etc.
Read the value of a card.
Remember things.
Compare things.
def: pseudocode is a convention for using everyday language infused with a programing language sensibility for describing how to solve a problem.
pseudocode is used to help you think and to help you communicate your ideas to other humans.
pseudocode is iterative. version 0 is free form, version n is relatively formal (but you get to make up the rules)
one convention: use indentation to show hierarchical logic
if hot day
go to pool
otherwise
go for bike ride
To Make Tea for Someone
boil water obtain tea obtain cup ask milk & sugar if yes milk add milk if yes sugar add sugar stir serve
boil water obtain tea obtain cup ask milk & sugar if yes milk add milk if yes sugar add sugar stir serve
Determine if number is even or odd
get number divide number by 2 record remainder if remainder = 0 print EVEN else print ODD
get number divide number by 2 record remainder if remainder = 0 print EVEN else print ODD
if expression action else other action
case expression value1 : action1 value2 : action2 ... valuen : actionn otherwise : defaultAction other action
bold text are "keywords" - generic things code can do
italics are for "objects"
ordinary text is an explanation
"append" means to add to the end of a list of things
"percept" refers to the information the robot takes in about the world
SMALL-CAPS() is for actions
whiteboard
whiteboard