Question: The function call random.choice(string.ascii_lowercase) returns a random lowercased ASCII letter. Create a function get_count that returns the number of unique letters returned by x sequential

The function call random.choice(string.ascii_lowercase) returns a random lowercased ASCII letter. Create a function get_count that returns the number of unique letters returned by x sequential calls of random.choice(string.ascii_lowercase). Your function should use a set comprehension.
>>> get_count(10)
8
>>> get_count(10)
7
>>> get_count(10)
9
>>> get_count(7)
5
The function should start with
import string
import random
def get_count(x):

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!