Web Designer (Freelance)
require 'rainbow' | |
rainbow = [{red: {r:255,g:0,b:0}},{orange: {r:255,g:127,b:0}},{yellow: {r:255,g:255,b:0}},{green: {r:0,g:255,b:0}},{blue: {r:0,g:0,b:255}},{indigo: {r:75,g:0,b:130}},{violet: {r:143,g:0,b:255}}] | |
rainbow.each do |x| | |
x.keys.each do |k| | |
puts Rainbow(k.to_s).color(k) | |
end | |
end |
puts "Hey! I'm a calculator!" | |
# Collects and checks for appropriate user input | |
print "I can add, subtract, divide, multiply, do exponents, and find a remainder. What would you like to do? " | |
operation = gets.chomp | |
possible_operations = ["+","add","addition","-","subtract","subtration","*","multiply","multiplication","/","divide","division","**","exponent","exponents","%","remainder","modulo"] | |
until possible_operations.include? operation | |
print "\n\nWomp Womp. Like I said, I can add, subtract, divide, multiply, do exponents, and find a remainder. What would you like to do? " | |
operation = gets.chomp |
#Note: the 'age_in_seconds' method works fine as a method in irb but does not consistently work in this code? | |
print "What would you like to know?\nA: How many days, hours, and minutes are in a number of years\nB: How many minutes are in a decade\nC: How many seconds old you are\nD: Convert your age in seconds to years\n" | |
choice = gets.chomp.upcase | |
def time_in_years | |
print "Years:" | |
years = gets.chomp.to_i | |
days = 365 * years | |
hours = 24 * days |
- Why are you interested in programming? What have you done to expose yourself to programming so far?
My passion for building, creating, and solving real world problems through technology inspired me to learn programming. I began with a course through Skillcrush where I learned the basics of HTML, CSS, JavaScript, and Ruby and gained the skills I needed take on freelance web design projects. Building websites for small businesses taught me how to build a website, upload it to a server, and work with clients to find solutions. After taking courses on Codecademy, Udemy, and working through introductory programming books such as “Eloquent JavaScript” and “Head First JavaScript Programming”, I joined Free Code Camp (FCC) where I have become an active member in the online community. Through FCC, I have learned foundational JavaScript, JQuery, and JSON skills and how to write basic algorithms, debug code, and build applications from scratch. Additionally, I have had the opportunity to connect with local dev