Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8.1 LAB: Set of upper and lowercase letters Write a function def letters ( s ) that gets the letters of a string as a

image text in transcribed
8.1 LAB: Set of upper and lowercase letters Write a function def letters ( s ) that gets the letters of a string as a set. (see p. 358 359 in 8.1 .1 on creating an empty set and then p. 359-360 in 8.1.2 on using a for loop to add to a set - the ex. uses a print() statement, but it works the same to add). You will also need an if statement to determine if the character is a letter before adding. Ex: If the string is: Happy Birthday to you! the set returned is: {i,h,h,p,a,B,t,H,d,y,u,x,0} Note that both upper- and lowercase letters appear in the set but not the ! Write the function only. You DO NOT need to get input 0 . Unit testing will be used to test the return value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Why do new ventures often turn to consultants for advice?

Answered: 1 week ago

Question

2. What process will you put in place to address conflicts?

Answered: 1 week ago