Can you guys help me to find the bags | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can you guys help me to find the bags

class Calculator: def__init__(self): print("Welcome to a calculator") def add(self, a, b): return a + b def sub(self, a, b): return a - b def mul(self, a, b): return a * b def div(self, a, b): return a / b cal = Calculator() a = int(input("Enter the first number: ")) c = input("Choose one of these (+, -, *, /): ") b = int(input("Enter the second number: ")) if c == "+": answer = cal.add(a, b) elif c == "-": answer = cal.sub(a, b) elif c == "*": answer = cal.mul(a, b) elif c == "/": answer = cal.div(a, b) print (f"{a}{c}{b}={answer}")

13th Mar 2021, 5:28 AM
O'rinboyev Azamat
O'rinboyev Azamat - avatar
1 Answer
+ 3
You're missing a space in line 2. def __init__(self):
13th Mar 2021, 5:56 AM
Simba
Simba - avatar