Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started