mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 08:50:41 +08:00
Fix typos in Sorts and Bit_manipulation (#4949)
* Fix several typos * Update bit_manipulation/README.md Co-authored-by: John Law <johnlaw.po@gmail.com> * Update double_sort.py Co-authored-by: John Law <johnlaw.po@gmail.com>
This commit is contained in:
@ -22,7 +22,7 @@ def binary_xor(a: int, b: int) -> str:
|
||||
>>> binary_xor(0, -1)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
ValueError: the value of both input must be positive
|
||||
ValueError: the value of both inputs must be positive
|
||||
>>> binary_xor(0, 1.1)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
@ -33,7 +33,7 @@ def binary_xor(a: int, b: int) -> str:
|
||||
TypeError: '<' not supported between instances of 'str' and 'int'
|
||||
"""
|
||||
if a < 0 or b < 0:
|
||||
raise ValueError("the value of both input must be positive")
|
||||
raise ValueError("the value of both inputs must be positive")
|
||||
|
||||
a_binary = str(bin(a))[2:] # remove the leading "0b"
|
||||
b_binary = str(bin(b))[2:] # remove the leading "0b"
|
||||
|
Reference in New Issue
Block a user