Answered step by step
Verified Expert Solution
Link Copied!

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

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions