Skip to content

Instantly share code, notes, and snippets.

@adriculous
Created July 19, 2016 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriculous/8c41954ea486fb819469a5b8fdd9dc83 to your computer and use it in GitHub Desktop.
Save adriculous/8c41954ea486fb819469a5b8fdd9dc83 to your computer and use it in GitHub Desktop.
Numerology App
# Numerology app. I'm new to this, since I'm completely unfamiliar with Numerology in itself. Okay, here we go! Ganbarimasu!
# the person/user inputs his/her birthday in integer format
puts "Welcome to the Numerology App! Let's start off by giving me your birthdate. Please provide it in MMDDYYYY format. Thank you!"
# using gets to get their birthday to a variable
birthday = gets
# going to use .to_i to convert the inputs to integers in array format
number = birthday[0].to_i + birthday[1].to_i + birthday[2].to_i + birthday[3].to_i + birthday[4].to_i + birthday[5].to_i + birthday[6].to_i + birthday[7].to_i
# convert the number to string, use array format
number = number.to_s
number = number[0].to_i + number[1].to_i
# if statement if the number is greater than 9; if it is, reduce
if number > 9
number = number[0].to_i + number[1].to_i
end
# case statement for the number meanings
case number
when 1
puts "Your numerology number is #{number}.\nOne is the leader. The number one indicates the ability to stand alone, and is a strong vibration. Ruled by the Sun."
when 2
puts "Your numerology number is #{number}.\nThis is the mediator and peace-lover. The number two indicates the desire for harmony. It is a gentle, considerate, and sensitive vibration. Ruled by the Moon."
when 3
puts "Your numerology number is #{number}.\nNumber Three is a sociable, friendly, and outgoing vibration. Kind, positive, and optimistic, Threes enjoy life and have a good sense of humor. Ruled by Jupiter."
when 4
puts "Your numerology number is #{number}.\nThis is the worker. Practical, with a love of detail, Fours are trustworthy, hard-working, and helpful. Ruled by Uranus."
when 5
puts "Your numerology number is #{number}.\nThis is the freedom lover. The number five is an intellectual vibration. These are ‘idea’ people with a love of variety and the ability to adapt to most situations. Ruled by Mercury."
when 6
puts "Your numerology number is #{number}.\nThis is the peace lover. The number six is a loving, stable, and harmonious vibration. Ruled by Venus."
when 7
puts "Your numerology number is #{number}.\nThis is the deep thinker. The number seven is a spiritual vibration. These people are not very attached to material things, are introspective, and generally quiet. Ruled by Neptune."
when 8
puts "Your numerology number is #{number}.\nThis is the manager. Number Eight is a strong, successful, and material vibration. Ruled by Saturn."
when 9
puts "Your numerology number is #{number}.\nThis is the teacher. Number Nine is a tolerant, somewhat impractical, and sympathetic vibration. Ruled by Mars."
else
puts "I am pretty sure that you were not born on the leap year date, because you should still get a Numerology number. Either you entered your birthddate in the incorrect format or you are not originally from Earth, you should have a number between 1-9."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment