Challenge (Jack's Lucky Ticket) | Sololearn: Learn to code for FREE!


Challenge (Jack's Lucky Ticket)

One day, Jack was going home by tram. When he got his ticket, he noticed that number on the ticket was not lucky. A lucky ticket is a six-digit number on the ticket in which sum of the first three digits is equal to the sum of the last three digits.For example, number 165912 is lucky because sum of ,1+6+5=12 and 9+1+2= 12. Since the number on the ticket wasn't lucky, Jack needs your help to find the next lucky ticket, if Jack's ticket number is 165901, then the next lucky ticket num 165903

10/9/2017 10:25:00 AM

Akhil Manchanda

4 Answers

New Answer


My try:


With Error Handling


Thats my code

0 My try in python.