Skip to content

Instantly share code, notes, and snippets.

# Angola:
# id: AGO
# name: Angola
# population: 21,471,618
# capital: Luanda
# latitude: -8.81155
# longitude: 13.242
# income level: Upper Middle
# high income?: false
# 1. assign the number 2015 to a variable named `this_year`
this_year = 2015
# 2. assign the number 2020 to a variable named `event_year`
event_year = 2020
# 3. calculate the difference in years and assign the value to `years_remaining`
years_remaining = event_year - this_year
# 4. use concatenation to create a message which reads:
types_of_people = 10
x = "There are #{types_of_people} types of people."
binary = "binary"
do_not = "don't"
y = "Those who know #{binary} and those who #{do_not}."
puts x
puts y
puts "I said #{x}."
cars = 100
space_in_a_car = 4.0
drivers = 30
passengers = 90
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passengers_per_car = passengers / cars_driven
cars = 100
space_in_a_car = 4.0
drivers = 30
passengers = 90
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passengers_per_car = passengers / cars_driven
cars = 100
space_in_a_car = 4.0
drivers = 30
passengers = 90
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passengers_per_car = passengers_car / cars driven
puts "I will now count my chickens:"
puts "Hens #{25 + 30 / 6}"
puts "Roosters #{100 - 25 *3 % 4}"
puts "Now I will count the eggs:"
puts 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6
puts "Is it true that 3 + 2 < 5 - 7?"
puts "I will now count my chickens:"
puts "Hens #{25 + 30 / 6}"
puts "Roosters #{100 - 25 *3 % 4}"
puts "Now I will count the eggs:"
puts 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6
puts "Is it true that 3 + 2 < 5 - 7?"
puts "Hello world!"
puts "Hello again"
puts "I like typing this."
puts "this is fun"
puts "yay Printing."
puts "I'd rather you'not'."
puts 'I "said" do not touch this.'
a=1+1
b= phill