DEV Community

Cover image for Can You Solve This Simple Python Challenge?

Posted on

Can You Solve This Simple Python Challenge?

You are running a lottery company, and you have distributed 100 tickets. Now, as the head of the company, you know that the winning ticket number has 7 as the last digit. You made an automatic portal for users to check whether they have won or not.
How will you fetch the last digit of the lottery number? Let's say The lottery number is 5678927, and you want to display Hurray. You won the lottery as your last digit is 7

PS: Solve this using only Arithmetic Operators

For Solution Click Here and Subscribe for more challenges

Top comments (1)

wjplatformer profile image

Yes I can :)