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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!