In Python: ####Note: Python enforces space, so ensure that each line of your cod
ID: 3744933 • Letter: I
Question
In Python:
####Note: Python enforces space, so ensure that each line of your code is in line with the line above it. ####Note: Only modify this file. Put code in after the line ######### YOUR CODE STARTS HERE ################ ####Note: For this assignment look at loop, conditional, and iterative documentation, help(str), along with lesson slides def conditionalComparison(a,b): result None #Below compare the value in a against b, return 1 if a is greater than b, a if they are equal, and-1 if b is greater than a #Note: you can use the built-in comparison symbols (.>,") to solve this ######### YOUR CODE STARTS HERE ################ ######### YOUR CODE ENDS HERE ################ return resultExplanation / Answer
def conditionalComparision(a, b): result = None if a > b: result = 1 elif a == b: result = 0 else: result = -1 return result
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.