8000 GitHub - denis-drachinsky/-: просто код
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

denis-drachinsky/-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

while True: s1 = input("Введите первый знак (+,-,,/): ") s2 = input("Введите второй знак (+,-,,/): ") if s1 and s2 in ('+', '-', '', '/'): a = float(input("a=")) b = float(input("b=")) c = float(input("c=")) if s1 == '+': if s2 == '+': print("%.2f" % (a+b+c)) elif s2 == '-': print("%.2f" % (a+b-c)) elif s2 == '': print("%.2f" % (a+bc)) elif s2 == '/': if c != 0: print("%.2f" % (a+b/c)) else: print("Devision by zero") if s1 == '-': if s2 == '+': print("%.2f" % (a-b+c)) elif s2 == '-': print("%.2f" % (a-b-c)) elif s2 == '': print("%.2f" % (a-bc)) elif s2 == '/': if c != 0: print("%.2f" % (a-b/c)) else: print("Devision by zero") if s1 == '': if s2 == '+': print("%.2f" % (ab+c)) elif s2 == '-': print("%.2f" % (ab-c)) elif s2 == '': print("%.2f" % (abc)) elif s2 == '/': if c != 0: print("%.2f" % (ab/c)) else: print("Devision by zero") if s1 == '/': if s2 == '+': print("%.2f" % (a/b+c)) elif s2 == '-': print("%.2f" % (a/b-c)) elif s2 == '': print("%.2f" % (a/bc)) elif s2 == '/': if c != 0: print("%.2f" % (a/b/c)) else: print("Devision by zero") else: print("Wrong operator")

About

просто код

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0