Cerca

Heus ací els resultats de la cerca.

4.1 PEP 257 – Docstring Conventions
10 Resultats, Darrera modificació:
ility of the code, and explaining the code to the user in a meaningful way. The user here means both other programmers and you (e.g. when you go back to your ... .: <code python>def fun(val): return val * 2 user_value = int(input("Enter the value: ")) # fun(user_value) # user_value = user_value + "foo" print(fun(
2.1 PEP 20 – The Zen of Python
9 Resultats, Darrera modificació:
o start refactoring your code. Flat code is more user-friendly, and becomes much **easier to maintain**... legant – these all contribute to how readable and user-friendly your code is. Remember: the readability... iply_number_by_two) </code> What happens when the user enters ''3.5'' or ''two'' as the input? Well, Pyt... t-in exceptions, and a great toolset for creating user-defined exception handling systems. The Zen of P
3.1 PEP 8 – Introduction
4 Resultats, Darrera modificació:
te the average of three numbers obtained from the user. Then # multiply the result by 4.17, and ass... sary, e.g.: <code python ❌> # Bad: a = 'Adam' # User's first name. </code> <code python ✔> # Good: user_first_name = 'Adam' </code> == Documentation strin... for "magic" objects and attributes that reside in user-controlled namespaces, e.g., %%__init__%%,%% __im