NoMoreSymbols Solutions | TCS CodeVita Season 12 | MockVita 1 | Tata Consultancy Services

  Рет қаралды 3,475

Tech Artifician

Tech Artifician

Күн бұрын

Пікірлер: 18
@srisabarivasan
@srisabarivasan 5 күн бұрын
NoMoreSymbols Python TCS MockVita 1 def pfix(exq): ta = [] ops = set(['+', '-', '*', '/', '%', '^']) to = exq.split() for t1 in reversed(to): if t1.isdigit(): ta.append(int(t1)) elif t1 in ops: if t1 == '^': if len(ta) < 2: return "expression is not complete or invalid" ex1 = ta.pop() be = ta.pop() ta.append(ex1 ** be) elif t1 == '/': if len(ta) < 2 or ta[-1] == 0: return "expression is not complete or invalid" op2 = ta.pop() op1 = ta.pop() ta.append(op1 // op2) elif t1 == '%': if len(ta) < 2 or ta[-1] == 0: return "expression is not complete or invalid" op2 = ta.pop() op1 = ta.pop() ta.append(op2 % op1) else: if len(ta) < 2: return "expression is not complete or invalid" op1 = ta.pop() op2 = ta.pop() if t1 == '+': ta.append(op1 + op2) elif t1 == '-': ta.append(op1 - op2) elif t1 == '*': ta.append(op1 * op2) else: return "expression is not complete or invalid" if len(ta) == 1: return ta[0] else: return "expression is not complete or invalid" dn2 = { "one": 1, "two": 2, "three": 3, "four": 4, "five": 5, "six": 6, "seven": 7, "eight": 8, "nine": 9, "zero": 0 } do1 = { "add": '+', "sub": '-', "mul": '*', "rem": '%', "pow": '^' } def conv(s): a1 = s.split('c') nx = 0 for i in a1: if i in dn2: nx = nx * 10 + dn2[i] else: return "-1" return str(nx) s = input() lee = s.split() st = "" flag = False for i in lee: if i not in do1: jik = conv(i) if jik == "-1": flag = True print("expression evaluation stopped invalid words present", end='') break st = st + jik + ' ' else: st = st + do1[i] + ' ' if not flag: print(pfix(st), end='')
@madhumitham98
@madhumitham98 5 күн бұрын
Please sir upload..
@gollareddygarisatishkumarr8815
@gollareddygarisatishkumarr8815 5 күн бұрын
9x9 problem answer bro
@srisabarivasan
@srisabarivasan 5 күн бұрын
​@@madhumitham98We will be uploading soon, so stay tuned and subscribe to our channel!
@srisabarivasan
@srisabarivasan 5 күн бұрын
​@@gollareddygarisatishkumarr8815We will be uploading soon, so stay tuned and subscribe to our channel!
@amanpatel1327
@amanpatel1327 3 күн бұрын
will it run for "div" because in problem it is not mentioned. only add, sub, mul, rem, and pow is mentioned.
@ClipsArena04
@ClipsArena04 5 күн бұрын
Bro upload in javs aa well
@hmsupraja
@hmsupraja 5 күн бұрын
Bro remaining answers please
@srisabarivasan
@srisabarivasan 5 күн бұрын
We will be uploading soon, so stay tuned and subscribe to our channel!
@sanjivani503
@sanjivani503 5 күн бұрын
give all solution sir !!
@srisabarivasan
@srisabarivasan 5 күн бұрын
We will be uploading soon, so stay tuned and subscribe to our channel!
@prathameshbagul3336
@prathameshbagul3336 5 күн бұрын
Upload all ans sir please 🙏🏻
@srisabarivasan
@srisabarivasan 5 күн бұрын
We will be uploading soon, so stay tuned and subscribe to our channel!
@prathameshbagul3336
@prathameshbagul3336 5 күн бұрын
I'll already subscribed ​@@srisabarivasan
@madhumitham98
@madhumitham98 5 күн бұрын
Upload balance 4 answers sir please 😢🥺🥺
@srisabarivasan
@srisabarivasan 5 күн бұрын
We will be uploading soon, so stay tuned and subscribe to our channel!
@enableyourselff
@enableyourselff 5 күн бұрын
remaining ans plzzzzzzzzzzzzz
@srisabarivasan
@srisabarivasan 5 күн бұрын
We will be uploading soon, so stay tuned and subscribe to our channel!
TCS Campus Interview I Campus Placements I Gauri Shrimali I Arvind Singh Pemawat
18:09
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН
Как не носить с собой вещи
00:31
Miracle
Рет қаралды 1,6 МЛН
Mom had to stand up for the whole family!❤️😍😁
00:39
Credit Score Website Video #hackathon
1:50
Francisco Cortez
Рет қаралды 7
Electrical engineering
2:03
Electrical Engineering
Рет қаралды 4
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН