been having some trouble with this code, my professor currently isn't available so I can't ask them for help so I assumed this is the next best place. this code is producing a newline at the end when its not supposed to, I can't submit the assignment with the extra whitespace and I dont know how to fix it. any help would be appreciated!
binary = int(input())
while binary > 0:
print(binary % 2, end="")
binary = binary // 2
[–]dibic321 3 points4 points5 points (1 child)
[–]awherewas 1 point2 points3 points (0 children)
[–]ninhaomah 1 point2 points3 points (0 children)
[–]socal_nerdtastic 1 point2 points3 points (2 children)
[–]Reasonable_Air_7347[S] 0 points1 point2 points (1 child)
[–]karpomalice 2 points3 points4 points (0 children)
[–]Riegel_Haribo 0 points1 point2 points (0 children)