Page 1 of 1

Question [20 points]: Define a class called Name so that the following code will return a greeting sentence as shown bel

Posted: Sun May 15, 2022 12:54 pm
by answerhappygod
Question 20 Points Define A Class Called Name So That The Following Code Will Return A Greeting Sentence As Shown Bel 1
Question 20 Points Define A Class Called Name So That The Following Code Will Return A Greeting Sentence As Shown Bel 1 (37.33 KiB) Viewed 61 times
Question [20 points]: Define a class called Name so that the following code will return a greeting sentence as shown below. Note that there are no repeated letters in the output. The order of the letters in {} does not matter. >>> person = Name ("Bob", "Pitt") >>> print (f"{person.hi() } Your name consists of letters {person.letter()}.") Hi, Bob Pitt. Your name consists of letters ('i', 'o', 'b', 'p', 't'}.