Skip to content

Update state_names.py#14

Open
ljlljlljl2 wants to merge 1 commit into
CP1404:masterfrom
ljlljlljl2:patch-1
Open

Update state_names.py#14
ljlljlljl2 wants to merge 1 commit into
CP1404:masterfrom
ljlljlljl2:patch-1

Conversation

@ljlljlljl2
Copy link
Copy Markdown

No description provided.

@ljlljlljl2
Copy link
Copy Markdown
Author

state_names.py

STATE_ABBREVIATIONS = {
"QLD": "Queensland",
"NSW": "New South Wales",
"VIC": "Victoria",
"TAS": "Tasmania",
"WA": "Western Australia",
"SA": "South Australia",
"ACT": "Australian Capital Territory",
"NT": "Northern Territory"
}

user_input = input("Enter short state (e.g., QLD): ").upper()

if user_input in STATE_ABBREVIATIONS:
print(f"{user_input} is {STATE_ABBREVIATIONS[user_input]}")
else:
print("Invalid short state")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant