Jan-12-2025, 12:21 AM
(This post was last modified: Jan-12-2025, 03:33 AM by deanhystad.)
Hello,
having trouble with some coding:
having trouble with some coding:
def double_num(number): # what code is needed to double the contents of the variable number? print(double_num(21))Below is what I am writing but I am getting a syntax error.
def double_num(number): # what code is needed to double the contents of the variable number? return # double_num(21)=21 * 2 number=21 double_num(21)=number * 2 # This line of code allows you to test your answer when you click the Run button print(double_num(21))Please help with this
deanhystad write Jan-12-2025, 03:33 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.