+ 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 Antworten
+ 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