Mar-25-2020, 09:28 AM
In general, it's better to make the function just return the values, not printing as well. Having the printing in there is extra coupling you don't need - it makes the function less reusable and harder to test.
Calculate the multiple of a number
|
|
Messages In This Thread |
Calculate the multiple of a number - by pythonuser1 - Mar-24-2020, 10:30 PM
RE: Calculate the multiple of a number - by deanhystad - Mar-25-2020, 04:31 AM
RE: Calculate the multiple of a number - by ndc85430 - Mar-25-2020, 09:28 AM
RE: Calculate the multiple of a number - by Fre3k - Mar-25-2020, 10:16 AM
RE: Calculate the multiple of a number - by DeaD_EyE - Mar-25-2020, 10:53 AM
RE: Calculate the multiple of a number - by deanhystad - Mar-25-2020, 07:36 PM
RE: Calculate the multiple of a number - by ibreeden - Mar-27-2020, 09:48 AM
RE: Calculate the multiple of a number - by deanhystad - Mar-27-2020, 02:22 PM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
calculate the 10001st prime number | topologh | 7 | 6,519 |
Oct-05-2020, 07:41 PM Last Post: deanhystad |
|
Divide a number - Multiple levels - Sum of all numbers equal to input number | pythoneer | 17 | 9,267 |
Apr-20-2018, 04:07 AM Last Post: pythoneer |