Ask coding questions

← Back to all posts
##### please help me out, whats wrong in this code

print("which mathematical operator will you want to use")
inp1=input()
if inp1=="division":
print("enter the divisor")
inp2=int(input())
print("enter the divident")
inp3=int(input())
if inp2==6 and inp3==56:
print("the quotient is 4")
else:
print("the quotient i",inp3/inp2)
elif inp1="addition":
print("enter the first number")
inp4=int(input())
print("enter the second number")
inp5=int(input())
if inp4==56 and inp5==9:
print("the sum is",77)
else:
print("the sum is",inp4+inp5)
elif inp1="multipliction":
print("enter the first number")
inp6=int(input())
print("enter the second number")
inp7=int(input())
if inp6==45 and inp7==3:
print("the product is",555)
else:
print("the product is",inp6*inp7)
elif inp1="subtraction":
print("enter the first number")
inp8=int(input())
print("enter the second number")
inp9=int(input())
print("the difference of two number is",inp9-inp8)

##### Comments
hotnewtop
RYANTADIPARTHI (6006)

can you show your repl

Wumi4 (486)

First, please format your code. Python is a language which indentation is important. Without formatting it, no one can check what's wrong with your code because they don't know which line of code belongs to which code block. Also, please use Markdown for better looking post. And also, please tell us what error do you face when you run it. Thanks.

PiyushAgrawal7 (1)

@Wumi4 I have done all these but when I copied and pasted it,it looked like that

DavidSafro (19)

@PiyushAgrawal7 you need to share a repl not text.