0
How can I use a variable as an argument or parameter in a function?
So basically I wanna declare a variable, then put it through a function as input, then output a string of text based on whether its odd or even. n = input(int()) def function(n): if (n % 2) == 0 in range(2, 5): print("Not Weird") else: print("Weird") return
2 odpowiedzi
+ 2
Babydoll Scripts ,
there are some issues in the code. see my comments in the attached file:
https://code.sololearn.com/c7QsZoxAHqq5/?ref=app
0
call your function using that same variable as a argument.
function(n)