Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

what is problem in this syntax

0 votes
asked Apr 26, 2020 by Diwakar Tiwari (120 points)
m = int(input("Enter\n"))
cn = input("Enter your command(+,-):")
n = int(input("Enter\n"))
o = int(input("Enter\n"))
p = int(input("Enter"))
if cn == +;
print("Your number is:" m+n+o+p)
else;
print("Your number is:" m-n-o-p)

1 Answer

+1 vote
answered Apr 26, 2020 by bhoomi2000 (780 points)

See the highlighted portion

m = int(input("Enter\n"))
cn = input("Enter your command(+,-):")
n = int(input("Enter\n"))
o = int(input("Enter\n"))
p = int(input("Enter"))
if cn == '+':
    print("Your number is:",m+n+o+p)
else:
    print("Your number is:",m-n-o-p)

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...