Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created February 27, 2020 01:08
Show Gist options
  • Save harrisonmalone/f82eef59f460db242eea1480076d549b to your computer and use it in GitHub Desktop.
Save harrisonmalone/f82eef59f460db242eea1480076d549b to your computer and use it in GitHub Desktop.
# quote_one = "sup dude"
# quote_two = "hello"
# quote_three = "good morning!"
# print quote_one
# doesn't give you a new line
# prints to terminal
# puts quote_two
# gives you a new line
# put to a string
# calls .to_s
# prints to terminal
# p quote_three
# gives you a new line
# calls .inspect
# show you what the data type is for strings and for other data types
# prints to terminal
# quote_one = "sup dude"
# quote_two = "hello"
# quote_three = "good morning!"
# num = 1 + 1
# float = 1.234
# PI = 3.14
# p PI
puts "whats your age?"
print "> "
age = gets.strip.to_i
if age >= 60
puts 'you\'re too old 😣'
elsif age >= 18
puts "how many drinks have you had?"
print "> "
number_of_drinks = gets.strip.to_i
if number_of_drinks < 6
puts "in da club 🕺"
else
puts 'denied 😪'
end
else
puts 'denied 😪'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment