MCPcopy Index your code
hub / github.com/geekcomputers/Python / user_name

Method user_name

advanced_calculator.py:232–246  ·  view source on GitHub ↗

_summary_: Get the name of the user and have an option to greet him/her

(self)

Source from the content-addressed store, hash-verified

230
231 # Here OOP is not followed.
232 def user_name(self):
233 """_summary_: Get the name of the user and have an option to greet him/her"""
234 self.name = input("Please enter your good name: ")
235 # Making validation checks here
236 text_to_audio = "{self.name}"
237 self.gtts_object = gTTS(text=text_to_audio, lang="en", tld="co.in", slow=False)
238 tts = self.gtts_object
239 fp = BytesIO()
240 tts.write_to_fp(fp)
241 fp.seek(0) # Reset the BytesIO object to the beginning
242 mixer.init()
243 mixer.music.load(fp)
244 mixer.music.play()
245 while mixer.music.get_busy():
246 time.Clock().tick(10)
247
248 def user_name_art(self):
249 """_summary_: Get the name of the user and have an option to show him his user name in art"""

Callers

nothing calls this directly

Calls 2

playMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected