PW Akshay

Generation

generate functionMon, 28 Nov 2022

import random from string import * constants = ascii_letters + digits + punctuation print(constants) password_length = int(input("What's the length of the password? ")) password = "" for i in range(password_length): password += random.choice(constants) print(password) # do not close the above program after execution and rerun the code.

# Function that takes two numbers and returns their sum. def add(a, b): return a + b # Function that takes two numbers and returns their product. def multiply(a, b): return a * b def subtraction(a, b): return a - b print(add(1, 2)) print(multiply(1, 2)) print(subtraction(1, 2))

Questions about programming?Chat with your personal AI assistant