Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 895 Bytes

exercise_1.md

File metadata and controls

47 lines (32 loc) · 895 Bytes

Unit 2 Practice

Exercise 1 - Mailing Address

1.1

  • Ask the user to enter a mailing address

    • Street
    • City
    • State
    • Zip Code
  • Assign the value of each field to a variable

  • Display the address back to the user using an f-string

    Enter street: 231 Faux Ave.
    Enter city: Portland
    Enter state: Oregon
    Enter zip code: 97211
    
    Output:
    231 Faux Ave.
    Portland, Oregon
    97211
    

1.2

Using string methods, ensure that the address will be properly capitalized, no matter how it's entered.

Enter address: 231 fAUx aVE.
Enter city: poRtlANd
Enter state: orEGOn
Enter zip code: 97211

Output:
231 Faux Ave.
Portland, Oregon
97211

Exercise 1 solution