Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

kindly follow what the question says and do not copy from anywhere and kindly don't use regular expressions. follow the examples please. upvote guaranteed. Write

kindly follow what the question says and do not
copy from anywhere and kindly don't use regular
expressions. follow the examples please. upvote
guaranteed.
image text in transcribed
Write a Python program that reads a number and finds the sum of the series of 1 + 33 + 111 + 3333 +....+N terms. Then it puts the reverse digit of the sum to a list and prints it. [Cannot use built-in reverse() or reversed( Sample Input 1: 5 Sample Output 1: Sum of series: 14589 Reverse sum of series in list: [9, 8, 5, 4, 1] Explanation 1: The input is 5 so the series will go on till 5th term. So the series becomes, 1 + 33 + 111 + 3333 + 11111. So the sum of the series is 14589. The reverse of the sum is 98541. So the reverse digits are 9, 8, 5, 4 and 1. Thus putting them into a list, the output becomes (9, 8, 5, 4, 1) Sample Input 2: 3 Sample Output 2: Sum of series: 145 Reverse sum of series in list: (5, 4, 1] Explanation: The input is 3 so the series will go on till 3th term. So the series becomes, 1 + 33 + 111. So the sum of the series is 145. The reverse of the sum is 541. So the reverse digits are 5,4 and 1. Thus putting them into a list, the output becomes (5, 4, 1)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

How should we think about risk management?

Answered: 1 week ago