[Tutor] Testing functions

Jack Simpson simpsonrmz41 at gmail.com
Mon Jun 26 06:16:17 EDT 2023


Hi.
I have just been playing around with functions and wanted to know where
should i be in putting variables to test out a function block i have
written?

This one is just an example for demonstration but where should I be
defining the value of username here to test the function?

>>> def hint_username(username):
...         if len(username) < 3:
...              print("Invalid username, must be at least 3 characters
long")
...         else:
..   .           print("Valid username")


More information about the Tutor mailing list