backtobackswe / backtobackswe-feedback

1 stars 0 forks source link

Power of Two #42

Open RaffaGonzo opened 1 year ago

RaffaGonzo commented 1 year ago

Back To Back SWE



Create a bug report to help us improve our content -



Your email registered on BackToBackSWE :

raphaelgonzalez1837@gmail.com



Category of the bug :



Description of the bug :

I can't test my solutions, I keep getting an error telling me the system might have been restarting but I experience the issue on multiple problems. I tested my solution on my computer and it works as expected which eliminates the potential for infinite loops (one solution has no loops to begin with).



Code you used for Submit/Run operation :

 def power_of_two(x):
     bin_repr = bin(x)
     bin_str = str(bin_repr)[2:]
     if bin_str == '1':
         return True
     elif bin_str == '0':
         return False
     return int(bin_str) == 0



Language used for code :

Python

#### Expected behavior :

This should return and throw no errors in testing but it seems that the test suite throws errors unrelated to my code

Screenshots :



Additional context :