Question: Homework Assignment 1 : Username Validation * * Scenario: * * You are creating a registration form and need to validate the usernames. * *
Homework Assignment : Username Validation
Scenario: You are creating a registration form and need to validate the usernames.
Task: Write a program that:
Asks the user to create a username.
Checks if the username starts with a capital letter.
Ensures it ends with a number.
Verify that it contains no special characters, except for underscores. Hint use replace
Provides feedback for each requirement.
# Example Output
Enter your desired username: User
Starts with a capital letter: Yes
Ends with a number: Yes
Contains only allowed characters: Yes
Your username User is valid!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
