Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given a column title A as appears in an Excel sheet, return its corresponding column number. Problem Constraints 1 1 B -> 2 C ->

Given a column title A as appears in an Excel sheet, return its corresponding column number.

Problem Constraints

1 <= |A| <= 100

Input Format

First and only argument is string A.

Output Format

Return an integer

Example Input

Input 1:

1

Input 2

28

Example Output

Output 1:

"A"

Output 2:

"AB"

Example Explanation

Explanation 1:

1 -> "A"

Explanation 2:

A-> 1

B -> 2

C -> 3

...

Z -> 26

AA -> 27

AB -> 28

Please note that python code for above question should pass large test cases, and all corner test cases, reasoning for below MCQs is also needed, please dont copy (unhelpful if copied or didn't answer all)

1. What will be the output of the following Python expression?

print(4.00/(2.0+2.0))

a) Error

b) 1.0

c) 1.00

d) 1

2. What will be the value of X in the following Python expression?

X = 2+9*((3*12)-8)/10

a) 30.0

b) 30.8

c) 28.4

d) 27.2

3. Which of the following expressions involves coercion when evaluated in Python?

a) 4.7 - 1.5

b) 7.9 * 6.3

c) 1.7 % 2

d) 3.4 + 4.6

4. What will be the output of the following Python expression?

24//6%3, 24//4//2

a) (1,3)

b) (0,3)

c) (1,0)

d) (3,1)

5. Which among the following list of operators has the highest precedence?

+, -, **, %, /, <<, >>, |

a) <<, >>

b) **

c) |

d) %

6. What will be the value of the following Python expression?

float(4+int(2.39)%2)

a) 5.0

b) 5

c) 4.0

d) 4

7. Which of the following expressions is an example of type conversion?

a) 4.0 + float(3)

b) 5.3 + 6.3

c) 5.0 + 3

d) 3 + 7

8. Which of the following expressions results in an error?

a) float('10')

b) int('10')

c) float('10.8')

d) int('10.8')

9. What will be the value of the following Python expression?

4+2**5//10

a) 3

b) 7

c) 77

d) 0

10. The expression 2**2**3 is evaluates as: (2**2)**3.

a) True

b) False

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions