PASSWORD GENERATOR BOT of PYTHON import random import string def generate_password (length): characters = string.ascii_letters + string.digits + string.punctuation password = '' .join( random. Choice (characters) for _ in range (length)) return password # Example usage to generate a 12-character password password = generate_password( 12 ) print (password) YOU CAN ALSO USE THIS ONE import random import string def generate_password(length, uppercase, lowercase, numbers, special): # Generates a password with customizable options for length, complexity, and character types. # Define the character sets for each type of character character_sets = [] if uppercase: character_sets.append(string.ascii_uppercase) if lowercase: character_sets.append(string.ascii_lowercase) if numbers: character_sets.append(string.d...
Calculate the Area of a Circle import math radius = float ( input ( "Enter the radius of the circle: " )) area = math.pi * (radius ** 2 ) print ( "Area of the circle:" , area)
Comments
Post a Comment