truncating division : Divide : Language Basics PYTHON examples


PYTHON examples » Language Basics » Divide »

 

truncating division


truncating division

x = 10

count = 0

while x > 0:
    x = x // 2
    count += 1

print "The approximate log2 is", count

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Language Basics
» Divide