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:
Manan Rathi
2021-10-20 14:12:32 +05:30
committed by GitHub
parent 83cf5786cd
commit 50485f7c8e
6 changed files with 18 additions and 19 deletions

View File

@ -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"