Skip to Content
Learn
Putting the Form in Formatter
Repeat for More Input

All right! Now we need to repeat what we’ve done for last_name, city, and state.

Instructions

1.

Add print prompts, variables, and gets.chomps for the user’s last name, city, and state/province. Use last_name as the variable for the user’s last name, city for their city, and state for their state or province. (Hint: prompt the user to provide an abbreviation for their state or province, such as “NY” for New York. This will naturally lead us to use .upcase later!)

Folder Icon

Take this course for free

Already have an account?