+ 7

* Beginner Project Idea *

LYCHREL NUMBERS This only works on Non Lychrel #s Take a number, add it to its backward self, and the sum is checked to be or not to be a palendrome. if it is not, it runs again with its new number (the sum) and checks that. ultimately getting to a palendrome and revealing how many runs it took. if it fails, that was a Lychrel # example - 47 47 + 74 = 121 1 Try reveals a palendrome example #2 - 349 349 + 943 = 1292 1292 + 2921 = 4213 4213 + 3124 = 7337 3 Trys reveals a palendrome

3rd Mar 2017, 12:48 PM
LordHill
LordHill - avatar
12 ответов
+ 11
https://code.sololearn.com/cq9Q13gtfY7r/?ref=app you can take help from above link.
3rd Mar 2017, 1:56 PM
adeel salim
adeel salim - avatar
+ 9
c# plesae
4th Mar 2017, 5:40 PM
code
code - avatar
+ 3
fun fact. 196 for instance has been run on a super computer over a billion iterations resulting in numbers over 400,000,000 digits long and still nothing.
3rd Mar 2017, 10:19 PM
LordHill
LordHill - avatar
+ 2
Great idea. This is the code i made: https://code.sololearn.com/caorAziv04Zk/#py
13th May 2017, 8:42 PM
Daniel
Daniel - avatar
+ 1
cool idea
3rd Mar 2017, 1:48 PM
Superswimmer9876
Superswimmer9876 - avatar
+ 1
As I have just started learning ruby i gave it a try: Chech out my Code Lychrel
4th Mar 2017, 5:24 PM
No One
No One - avatar
0
Get the number and convert to String using str(). Reverse the string using slice syntax [::-1]. Convert the reverse string to int using int(); Check if the initial number and the reverse number are equals. If not, increment the attempt and execute all again.
3rd Mar 2017, 2:09 PM
Thiago
0
How I did it. Maybe not the best way, but it got me the result I needed. run=True def flip(x): x=str(x) x=x[::-1] x=int(x) return x def check(a,b): global trys print(a, end=' ') print("+", end=' ') print(b, end=' ') print("=", end=' ') c=a+b print(c) d=flip(c) if c == d: print() print("The Palendrome Is %d" % c) print() print("Solved in %d runs" % trys) else: trys+=1 check(c,d) while run == True: trys=1 print("\n"*2) number=input("Enter A Number - ") print(number) print("\n") numberFlip=flip(number) number=int(number) check(number, numberFlip)
3rd Mar 2017, 10:02 PM
LordHill
LordHill - avatar
0
nice
4th Mar 2017, 5:27 PM
LordHill
LordHill - avatar
0
you want it in c#, write it in c# and show us. this is just a simple project for beginners.. I would like to see it in c#
4th Mar 2017, 5:50 PM
LordHill
LordHill - avatar
0
Nice code Daniel!
13th May 2017, 9:05 PM
LordHill
LordHill - avatar
0
Thank you guys very much I appreciate your kind help
2nd Mar 2019, 3:47 AM
Talkmore Gamanya
Talkmore Gamanya - avatar