Question: Raju's Conlang Problem Description As we all know Python was created by Guido van Rossum, a Dutch programmer. Raju a coding enthusiast, is trying to

Raju's Conlang
Problem Description
As we all know Python was created by Guido van Rossum, a Dutch programmer. Raju a coding enthusiast, is trying to become a new Guido van Rossum, by developing a new coding language!
Initially, he started with developing syntaxes, especially the if, if-else and nested if, which are control flow structures and only using comparison operators(>,<,==,!=) along with the print function. He felt that it should deviate from the syntax what already exists in other languages. So he made it like below -
If Syntax in Raju's coding language
is AB
Yes
is A>C
Yes
print A
No
print C
si
No
is B>C
Yes
print B
No
print C
si
Given a script, just having either If, If-else or nested If, print the output.
Constraints
3<= number of lines in the script <=50
1<= values that variables hold <=50
Input
The script with any of if, if-else , nested if will be present in the first few lines.
Second last line has the variables used in the script, separated by space. The variable names will be A to Z.
Last line consists of space separated integers denoting the values of variables mentioned in the above line.
Output
Print the output of the script.
Time Limit (secs)
1
Examples
Example 1
Input
is AB
Yes
print B
No
print A
si
A B
12
Output
1
1
Explanation
The above script depicts -
if (A < B){
print(A)
}
if (A > B){
print(B)
}
else{
print(A)
}
Here A=1 and B=2, since B > A, according to the condition, we print A as output in the first line which is 1, followed by A>B ,by condition executing else block and printing A as output in the second line which is 1.
Example 2
Input
is A

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 Databases Questions!