If Else statement when identifying voltage? HELP! Science Fair Project

He wants the card to identify when the phone is plugged in. What does he need to use?