Skip to content

Instantly share code, notes, and snippets.

@karlosmid
Last active August 29, 2015 14:19
Show Gist options
  • Save karlosmid/69faa9afaaccacc90446 to your computer and use it in GitHub Desktop.
Save karlosmid/69faa9afaaccacc90446 to your computer and use it in GitHub Desktop.
if then elsif logical error
destination = ['Earth', 'Moon', 'Mars']
backtrip = [true,false]
if destination == 'Earth'
cost = 1000000000
elsif destination == 'Mars'
cost = 2000000000
elsif destination == 'Moon'
cost = 1500000000
elsif backtrip
cost = 3000000000
else
cost = 4000000000
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment