Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started