Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadded binary_count_trailing_zeros.py #2557
Conversation
Travis tests have failedHey @vivek9patel, TravisBuddy Request Identifier: ed078060-039e-11eb-b614-dd2b96524a99 |
Travis tests have failedHey @vivek9patel, TravisBuddy Request Identifier: 60a663a0-03a0-11eb-b614-dd2b96524a99 |
Travis tests have failedHey @vivek9patel, TravisBuddy Request Identifier: 0a6f81f0-03a1-11eb-b614-dd2b96524a99 |
| if a < 0: | ||
| raise ValueError("the value of input must be positive") |
dhruvmanila
Oct 1, 2020
Member
Suggested change
if a < 0:
raise ValueError("the value of input must be positive")
if a < 0:
raise ValueError("Input value must be a positive integer")
Please use isinstance to check whether the input is of type float and raise TypeError with an appropriate message.
| if a < 0: | |
| raise ValueError("the value of input must be positive") | |
| if a < 0: | |
| raise ValueError("Input value must be a positive integer") |
Please use isinstance to check whether the input is of type float and raise TypeError with an appropriate message.
vivek9patel
Oct 1, 2020
Author
Contributor
sure!
sure!
| from math import log2 | ||
|
|
||
|
|
||
| def binary_count_trailing_zeros(a: int): |
dhruvmanila
Oct 1, 2020
Member
Suggested change
def binary_count_trailing_zeros(a: int):
def binary_count_trailing_zeros(a: int) -> int:
| def binary_count_trailing_zeros(a: int): | |
| def binary_count_trailing_zeros(a: int) -> int: |
|
@cclauss can you please review this? |


Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}.