MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / answer

Function answer

other/guess_the_number_search.py:121–130  ·  view source on GitHub ↗

Returns value by comparing with entered `to_guess` number

(number: int)

Source from the content-addressed store, hash-verified

119 )
120
121 def answer(number: int) -> str:
122 """
123 Returns value by comparing with entered `to_guess` number
124 """
125 if number > to_guess:
126 return "high"
127 elif number < to_guess:
128 return "low"
129 else:
130 return "same"
131
132 print("started...")
133

Callers 1

guess_the_numberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected