My python code in Visual Code Studio is having some problems:
def calculate(n):
sum = (n*(n+1))/2
return sum
in_value = int(input(">"))
answer = int(calculate())
print(answer)
But I can not enter the input value in the output console: Why does that happen ? Thanks for answering
in_valueanywhere in your code. This code should raise an exception because you don't pass a required argument (n) to your functioncalculate.