Question
Write a Python program, in a file called NoDuplicates.py, to create a list of N unique characters by randomly generating integers between and including 65
Write a Python program, in a file called NoDuplicates.py, to create a list of N unique characters by randomly generating integers between and including 65 and 90 (the ASCII numeric codes for the characters A to Z) and adding their character equivalents to the list, only if the list does not already contain that character. The value of N should be given by the user, in the range 1 to 26. You may use the chr()function to convert from an integer to an ASCII character. For example, if x = 66, then chr(x) gives the character "B". Output the final list of unique characters. Note:You may not use any build-in Python data structures, other than the list.If the user enters a value outside the range 1-26, an appropriate message should be printed
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