I am very new to programming, atleast with object oriented so please be gentle :)
I am trying to create a budgeting program and I am having trouble identifying strings. I have a variable called payperiod, simple enough it will be used to hold the string value of either weekly, monthly etc. What am I doing wrong here?
#!/usr/bin/env ruby # # Simple Budgeting Program # puts "Hi, I would like to develop a budgeting program for you..\n\n\n\n\n" puts "What is your budget type? \n \n \n You can say 'Monthly' 'Weekly' or 'Fortnightly' \n" payperiod = gets if payperiod == "Monthly" puts "You are paid monthly." end if payperiod == "Weekly" puts "You are paid Weekly" end if payperiod == "Fortnightly" puts "You are paid every two weeks!" end