Ad

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.

Code
Diff
  • def return_hundred(n):
        num = n
        n = n/num
        while(n!=100):
            if(n<100):
                n *= 10
            if(n>100):
                n = n /10
        return n
    #this is goat.
    • def return_hundred(n):
    • numer = n
    • n = n/numer
    • num = n
    • n = n/num
    • while(n!=100):
    • if(n<100):
    • n *= 10
    • if(n>100):
    • n = n /10
    • return n
    • #this is goat.

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.

Code
Diff
  • 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