Question: Python code for the following pseudocode define checkGuess(input_1, input_2): { input_1 = convert input_1 into lower-case if in upper-case; input_2 = convert input_2 into lower-case

Python code for the following pseudocode

define checkGuess(input_1, input_2):

{

input_1 = convert input_1 into lower-case if in upper-case;

input_2 = convert input_2 into lower-case if in upper-case;

in1_ASCII = store ASCII value of input_1;

in2_ASCII = store ASCII value of input_2;

declare diff = in1_ASCII - in2_ASCII;

if diff > 0 : { return 1; }

else if diff < 0: { return -1; }

return 0; //this is for diff == 0 }

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!