PRP201c_-_SP_2022_-_Block5_-_PE_131.webp
Kim Anh1

PRP201c_-_SP_2022_-_Block5_-_PE_131.webp

  • Media owner Kim Anh1
  • Ngày thêm
def DecimalToBinary (num):
if num >= 1:
DecimalToBinary (num // 2)
if num! 0:
print(num % 2, end = '')
while True:
number = input("Enter a positive integer number: ")
try:
usVal = int(number)
if usVal < 0:
print("The number must be positive.")
continue
break
except ValueError:
print("The number must be a positive integer.")
print("%d is converted to binary: " % usVal, end = "")
imalToBinary(usVal
Chưa có bình luận nào.

Thông tin

Category
PRP201c
Thêm bởi
Kim Anh1
Ngày thêm
Lượt xem
202
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom