Syntax Error for ? operator

https://ide.codingblocks.com/#/s/22539
I am getting a error on line 17 and 18 regarding the “?” operator discussed in the OOPS video.The error says “Invalid syntax”. Can anyone help?

try to run this code in jupyter notebook.it should work there as the ? functionality is defined in jupyter notebook i.e
it is not a function of python instead is a function defined in the notebook.

1 Like

It worked. :smiley: Thanks a lot!