0
Can anyone help me out with this please?
Tried solving a question with the def function and it works quite well without using the input() function but once i do put an input() function it doesn't work. https://code.sololearn.com/cXhAAPigx4RU/?ref=app
5 Answers
+ 1
Incorrect matching braces in function call..
Check again.
edit:
print_pure_function(int(input("what principal? ") ), int(input("what year? ")))
+ 1
print_pure_function(int(input("what principal? ")), int(input("what year? ")))
+ 1
check your parenthesis pairsing(brackets)in line 7
0
Hello Daniel
The function cannot accept input because it works like the print function and therefore will print what you ask it to display. And since that was not in its parameters, it shows an error but If you want the user input, you can ask the user to do so as in the code below.
https://www.sololearn.com/compiler-playground/cX3xGChFU2CK
0
Thanks alot for the replies guys, i really appreciate.