Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want to fix this problem in python CSC 131 PROGRAMMING ASSIGNMENT 4 FALL 2017 An interesting problem was posed recently on Public Broadcasting System's
I want to fix this problem in python
CSC 131 PROGRAMMING ASSIGNMENT 4 FALL 2017 An interesting problem was posed recently on Public Broadcasting System's Square One ( a kid's show about mathematics): Take a starting number, n, add to it its reverse, and continue this process until the result is a palindrome ( a number that reads 1). For example, starting with 95, we add it to its reverse to get 95+59- 154. Add this to its reverse, and we get 154 +451 605. Add thi palindrome. We determined this after three iterations of the process. is to its reverse and we get, 605+506 1111, which is a Write a program to count the number of iterations this process takes to produce a palindrome, and try it for some starting values. The numbers can get pretty big in this process. For example, for the starting value 98-that takes 24 iterations and results in the palindrome 8,813.200,023.188. Don't even think about trying it on 295 - if that ever results in a palindrome, the result is at least 3200 digits long. One could wonder if the process always results in a palindrome but. You will probably wane, to write a function reverse( n), which reverses n, so for example, reverse(4723) -324. You could then use reverse to write a function palindrome( n), which returns true if and only if n is a palindrome. SUBMISSION CHECKLIST 1) Turn in a printout and place the source file, the project file, and an executable in your upload folder on Trace. 2) Call your folder and program PROG4 3) The program must be commented. Comments at the beginning of the program must minimally include: a) A descriptive title for the program b) The course number and assignment number c) Your name d) A concise description of the program, including input and output This program is due at the start of class on Tuesday October 17h Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started