Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer required in python programming language? If A=0,B=1,C=B+A,D=C+B, and so on, find the sum of the alphabets of a given word. Input Specification: input1: String

image text in transcribed

image text in transcribed

image text in transcribed

answer required in python programming language?

If A=0,B=1,C=B+A,D=C+B, and so on, find the sum of the alphabets of a given word. Input Specification: input1: String representing any word Output Specification: Return an integer value which represents the sum of all the alphabets in input1, as per the above-given scenario. Example 1: input1: MAN Output: 377 Explanation: Given the ahove scenario, the values of M,A, and N are 144,0 and 233 respectively. Hence, the sum returned is 144+0+233=377. Example 2: input1: MORE Output: 2121 Explanation: Given the above scenario, the values of M, O, R and E are 144,377,1597 and 3 respectively. Hence, the sum retumed is 144+377+1597+3=21 : Explanation: Given the above scenario, the values of M, O, R and E are 144, 377,1597 and 3 respectively. Hence, the sum returned is 144+377+1597+3=2121. ad only region start UserMainCode(object): delassinethod def letter(cls, input1): input1: string Expected return type : int \# Read only region end

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

Step: 3

blur-text-image

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

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions