+ 1

No output on first Swift code

https://code.sololearn.com/c2g7gC2w4KHv/?ref=app Hi guys! Having trouble here and not sure what’s wrong, please let me know! Thank you, I appreciate it!!

8th Dec 2019, 8:24 PM
Carmine
Carmine - avatar
2 Respuestas
+ 4
Your program does work perfectly. You are not having it output anything. Change the zero on line 3 to one to get output. Changing P2_death after the if has no effect on getting to the print as that already happened.
9th Dec 2019, 12:31 PM
John Wells
John Wells - avatar
+ 1
Thank you John! I think I may have been getting ahead of myself, attempting to do functions without knowing what there truly consist of!
11th Dec 2019, 3:09 PM
Carmine
Carmine - avatar