Skip to content

Chinilshik-kalkulatorov/Gay_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Registration Program

This Python program allows a user to set up a username and password with certain requirements. It serves as a basic example of how a registration system might be implemented.

Features

  • Username input: Allows the user to set their desired username.
  • Password input: Allows the user to set their password, ensuring it's at least 12 characters long.
  • Password verification: Asks the user to re-enter their password, verifying they know it, and provides opportunity for correction in case of mismatch.

Algoritm

graph TB
    Start --> EnterUsername
    EnterUsername --> EnterPassword
    EnterPassword --> IsPasswordLongEnough
    IsPasswordLongEnough{Is password >= 12 characters?} --> |No| EnterPassword
    IsPasswordLongEnough --> |Yes| VerifyPassword
    VerifyPassword{Do passwords match?} --> |No| EnterPassword
    VerifyPassword --> |Yes| Success
    Success --> End
Loading

Usage/Examples

Run the script in your Python environment. The program will guide you through the registration process.

while True:
    username = input("Enter username: ")
    password = input("Enter password: ")

    if len(password) < 12:  # Check password length
        print("Password must be at least 12 characters. Please try again.")
        continue  # Return to start of loop

    password_check = input("Re-enter your password: ")

    if password == password_check:  # Check password match
        print("Registration successful.")
        break
    else:
        print("Passwords do not match. Please try again.")

Run Locally

Run the script in your Python environment. The program will guide you through the registration process.

  python Testmile.py

Badges

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages