import math
F = -3.14
def name(p):
    o = 10**p
    return o


F = -3.14

L=0

J1=name(L)
H1=name(-L)

G = math.floor(F*J1)*H1

if F>0 : 
    if F >= G + (0.5 * H1):
        F = G + H1
    else:
        F = G + 0
else:
    if F <= G - (0.5 * H1):
        F = G - H1
    else:
        F = G + 0

print(F)

toH=0

def NM(D,C):
    y = D
    x = C
    J2=name(x)
    H2=name(-x)
    G2 = math.floor(y*J2)*H2
    if y>0 : 
         if y >= G2 + (0.5 * H2):
             y = G2 + H2
         else:
             y = G2 + 0
    else:
        if y <= G2 - (0.5 * H2):
            y = G2 - H2
        else:
            y = G2 + 0
    print(y)
    return y

NM(2.6,0)


Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: