Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!