Question: Complete the following steps: Let's implement a function called greaterThan, which compares two numbers. The function will take in two parameters, x and y .

Complete the following steps:
Let's implement a function called "greaterThan," which compares two numbers.
The function will take in two parameters, x and y.The function must check to see if x is greater than y.If x is greater than y, the function should return true; otherwise, it should return false.
The main section of our program should:
Assign 2 to variable "a" and 3 to variable "b".Then, we will call the function storing the result in a variablePrint the output with the follow statement based on your results, The statement variable a is greater than variable b is false.The results should look like this - The statement 2 is greater than 3 is false
Remember, when you put your print statement together, you must convert a, b, and result to a str to make your print statement work. Make sure you use appropriate spacing. You have all of the tools you need to complete this assignment. Good luck.
Now that your program is running, you must test all scenarios, change variables a to 10 and b to 6, then run your program.

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!