Q. Write a program to input a formula with some brackets and checks, and prints out if the formula has the same number of opening and closing parentheses.
Answer =
formula = input("Enter the formula :-") count_open = 0 count_close = 0 for i in formula : if i == "(" : count_open += 1 elif i == ")": count_close += 1 if count_open == count_close : print("Correct formula") else : print("worng")
hey prabu
ReplyDeletehey harinam krisna
what is this i cant understand a fucking thing
ReplyDeletepls maintain your language mr nethis from kikani cbe
Deletealso home = ondipudur
dont do like aunty mr nethish sharma frm cbe
Deleteok siva kumar
ReplyDeletehey guysssss
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )