Skip to content

Instantly share code, notes, and snippets.

@davetannenbaum
Last active August 29, 2015 14:20
Show Gist options
  • Save davetannenbaum/52e19fcf982a1ea4f9ac to your computer and use it in GitHub Desktop.
Save davetannenbaum/52e19fcf982a1ea4f9ac to your computer and use it in GitHub Desktop.
*maintain: *Judgments of City Sizes*
>> cityA = ["New York", "Chicago", "San Francisco", "Madrid"]
>> cityB = ["Austin", "Portland", "Boulder", "Paris"]
>> cityA.randomize
>> cityB.randomize
>> i = 1
*while: i <= cityA.size
*question: Which of these two cities is larger?
{cityA[i]}
{cityB[i]}
*label: invalid
*question: What is the probability that {cityA[i]} is larger than {cityB[i]}?
*type: number
*after: %
*save: probability
*if: probability < 0 or probability > 100
ERROR: You must give a number *between 0 and 100.*
*goto: invalid
>> i = i + 1
Thank you. That’s the end of this *extremely scientific* experiment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment