Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def nota():
- def void():
- print("\n"*1000)
- import string
- bol=True
- try:
- m=string.punctuation
- m=m.replace(".","")
- c="10"
- a=input("Insert the number: ")
- if a=="":
- import dlkjfg
- for kjkj in string.ascii_letters:
- if a.count(kjkj)!=0:
- 6/0
- for kjkjk in m:
- if a.count(kjkjk)!=0:
- 6/0
- if a.count(".")==0:
- a=a[:1]+"."+a[1:]
- b=a.find(".")
- d=(a[b+1:len(a)-1])
- for l in range(len(d)):
- c=c+"0"
- e=str(c.count("0"))
- print(a+" * 10^"+e)
- else:
- if a[0]!="." and a[0]!="0":
- print(a+" * 10^0")
- bol=False
- w=2
- q=a.find(".")
- if q==0:
- a="0"+a
- while True:
- if a[w]=="0":
- w=w+1
- else:
- break
- r=a[w:len(a)]
- t=len(a)-(len(r)-1)
- for ll in range(t):
- c=c+"0"
- u=str(c.count("0")-3)
- r=r[:1]+"."+r[1:]
- if bol:
- print(r+" * 10^-"+u)
- input("Enter to delete.")
- void()
- except ZeroDivisionError:
- input("You may not post lettere.Invio to Cancel.")
- void()
- except ImportError:
- input("Enter a number.")
- void()
- while True:
- nota()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement