Created
February 27, 2020 01:08
-
-
Save harrisonmalone/f82eef59f460db242eea1480076d549b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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