The best code to transform any real_number to 10^2. I dare you all to do it for complex numbers, e.g. Z = 100 + 100i.
Crazy emoji.
Implementation of a code for give 10^2 given any real number.
I dare you all to do it for complex numbers, z = 100 + 100i. Crazy emoji.
def return_hundred(n): numer = n n = n/numer while(n!=100): if(n<100): n *= 10 if(n>100): n = n /10 return n
def return_hundred():n = 100000 // 1000- def return_hundred(n):
- numer = n
- n = n/numer
- while(n!=100):
- if(n<100):
- n *= 10
- if(n>100):
- n = n /10
- return n
Test.assert_equals(return_hundred(8),100) Test.assert_equals(return_hundred(34),100) Test.assert_equals(return_hundred(123),100)
Test.assert_equals(return_hundred(),100)- Test.assert_equals(return_hundred(8),100)
- Test.assert_equals(return_hundred(34),100)
- Test.assert_equals(return_hundred(123),100)