Write a function, named randomPassword, that generates a random password that takes no parameter. It will return the randomly generated password as its ONLY result. Display the randomly generated password in the main program. Password Criteria: o The password should have a random length of between 7 and 10 characters. o Each character should be randomly selected from positions 33 to 126 from the ASCII table You must import randint function directly and inline within the random package and it must be the first line of code in your program, after your program header comment. o Declaring and using FOUR constants. Constants must be named appropriately and intuitively. o You must use the chr built-in function within your randomPassword function: o Declaring the main function and invoking randomPassword function. o Logical approach to problem solving, computation, and displaying appropriate output.
Write a function, named randomPassword, that generates a random password that takes no parameter. It will return the randomly generated password as its ONLY result. Display the randomly generated password in the main program.
Password Criteria:
o The password should have a random length of between 7 and 10 characters.
o Each character should be randomly selected from positions 33 to 126 from the ASCII table
You must import randint function directly and inline within the random package and it must be the first line of code in your program, after your program header comment.
o Declaring and using FOUR constants. Constants must be named appropriately and intuitively.
o You must use the chr built-in function within your randomPassword function:
o Declaring the main function and invoking randomPassword function.
o Logical approach to problem solving, computation, and displaying appropriate output.
Step by step
Solved in 2 steps with 1 images