Code

hari ganivada <[email protected]>
Newsgroups gmane.comp.python.tutor
Message-ID <CAMhHovdaytDk=w9OK3dhaFi7Xq6wd3Zo_=5JFV0TNp=9LXy7UQ@mail.gmail.com>
Sir

  I am hari Ganivada.
   def is _power_off_two(number)
   number=2
  while number ℅ 2==0:
  number = number/2
 If number == 1:
    return true
  return False
Call to the function
print(is_power_of_two(0)) # should be False
print(is_power_of_two(1))# should be true
print(is_power_of_two(8))#should be true
print(is_power_of_two(9))#should be false.

Please help me sir



---------- Forwarded message ---------
From: hari ganivada <[email protected]>
Date: Thu, 13 Jul, 2023, 18:41
Subject:
To: <[email protected]>


Sir

  I am hari Ganivada.
   def is _power_off_two(number)
   number=2
  while number ℅ 2==0:
  number = number/2
 If number == 1:
    return true
  return False
Call to the function
print(is_power_of_two(0)) # should be False
print(is_power_of_two(1))# should be true
print(is_power_of_two(8))#should be true
print(is_power_of_two(9))#should be false.

Please help me sir
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.