I hereby claim:
- I am cryptochris on github.
- I am cryptochris (https://keybase.io/cryptochris) on keybase.
- I have a public key ASCiKSgJHqdkvfmC-IaMaEe1hyC-82LjRpOVgQyHyVjFEAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| def odd_sum(*numbers) | |
| odd_numbs = Proc.new { |numbers| numbers % 2 != 0 } | |
| add = numbers.select(&odd_numbs) | |
| math = Proc.new { |n| n + n} | |
| end |
| def ask(question, kind="string") | |
| print question + " " | |
| answer = gets.chomp | |
| answer = answer.to_i if kind == "number" | |
| return answer | |
| end | |
| def add_contact | |
| contact = {"name" => "", "phone_numbers" => []} | |
| contact["name"] = ask("What is the person's name?") |
| module ThePresent | |
| def now | |
| puts "It's #{Time.new.hour > 12 ? Time.new.hour - 12 : Time.new.hour}:#{Time.new.min} #{Time.new.hour > 12 ? 'PM' : 'AM'} (GMT)." | |
| end | |
| end | |
| class TheHereAnd | |
| extend ThePresent | |
| end |
| class Person | |
| def initialize(name, age) | |
| @name = name | |
| @age = age | |
| end | |
| public | |
| def about_me | |
| puts "I'm #{@name} and I'm #{@age} years old!" |
| class Machine | |
| @@users = {} | |
| def initialize(username, password) | |
| @username = username | |
| @password = password | |
| @@users[username] = password | |
| @files = {} | |
| end | |
| Instructions | |
| First, remove the puts "Movies!" when the user types "display". | |
| Next, iterate through the hash using .each and puts each movie/rating pair. | |
| The format should be "#{movie}: #{rating}. Make sure to test it out! |