Needing help with Learn Python: Functions

Hello all. I’m completely stuck with this one code and I do not know how to figure it out without using the “Solutions” button, which I do not want to do. Here is my current code:



The function mult_two_add_three() prints a number multiplied by 2 and added to 3 . As it is written right now, the number that it operates on is always 5 .

Call the function and see what it prints to the console.

Stuck? Get a hint


Now, modify the function definition so that it has a parameter called number . Then delete the number = 5 assignment on the first line of the function.

Pass the number 1 into your function call.

The function prints the value of: 5*2+3
You have to use the function:

mult_two_add_three() #prints  13

Then you have to modify the function so that in the function definion: def mult_two_add_three():
You have to add number between the parentheses just simply.
Then you have to modify the function body so that you delete number = 5 because number will be the parameter and you don’t have to set it as a variable
Then just put 1 between the parentheses when you call the function.

Hope this helps :grinning:

I’m still lost, sorry. I have a learning disability where I get confused easily.