MCPcopy Create free account
hub / github.com/geekcomputers/Python / user_name_art

Method user_name_art

advanced_calculator.py:248–270  ·  view source on GitHub ↗

_summary_: Get the name of the user and have an option to show him his user name in art

(self)

Source from the content-addressed store, hash-verified

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"""
250 # Default is to show = True, else False if user tries to disable it.
251
252 # Tell him to show the time and date
253 # print(art.text2art(self.name))
254 # print(date and time of now)
255 # Remove whitespaces from beginning and end
256 # Remove middle name and last name
257 # Remove special characters
258 # Remove numbers
259 f_name = self.name.split(" ")[0]
260 f_name = f_name.strip()
261 # Remove every number present in it
262 # Will have to practice not logic
263 f_name = "".join([i for i in f_name if not i.isdigit()])
264
265 # perform string operations on it for the art to be displayed.
266 # Remove white spaces
267 # Remove middle name and last name
268 # Remove special characters
269 # Remove numbers
270 # Remove everything
271
272 class unitConversion:
273 """_summary_: Class enriched with all the methods to convert units"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected