+ 1
What am I doing wrong
I am trying to determine the total price of 5 tickets using the youngest personâs age as the discount, but Iâm stuck. My Code: https://code.sololearn.com/cKK3Q5P2x9OU/?ref=app Its saying smallest hasnât been declared, but I thought I did that, Iâve tried a few things but I canât figure out what Iâm doing wrong.
2 RĂ©ponses
+ 3
Declare smallest before outside if block. Or close if block after print smallest..
Variable declared within a block belong to that block only.. It's a local scope in that block. Outside of it not available..
+ 2
Thank you Jayakrishnađźđł, I actually managed to figure that out right after posting my question. lol