InfyTQ sample test cases solved || InfyTQ certification exam

Опубликовано: 18 Июль 2019
на канале: LEARNING LIFE'S
18,156
168

InfyTQ



STRINGS TECHNIQUES YOU NEED TO KNOW TO ATTEMPT INFYTQ CERTIFICATION:    • STRINGS TECHNIQUES USEFULL FOR INFYTQ...  



MODIFIED CODES LINK : http://clesolea.com/1FgW(WAIT FOR 5SEC AND SKIP THE AD AND DOWNLOAD THE FILE )

#PALINDROME CODE
def pal(num):
rev =int(str(num) [::-1])
rev1 = num+rev1
rev2 = int(str(rev1) [::-1])
if rev1 == rev2:
print(rev2)
else:
num=rev2
pal(num) #modified code
num = int(input ())
#in question they asked to take input as #int with this all test cases will be solved


#now it fails only for 2 test cases

#STRINGS

Strr= input()
first=""
if Strr[0]=='-':
first=first + '-'
num=[int(i) for i in Strr if i.isdigit()]
for a in num:
first=first + str(a)
print(first)


strings :    • infytq sample test cases solved quest...  

FOLLOW THE PLAYLIST : INFYTQ PREPARATION TIPS& EXAMPLE PROBLEM GIVEN IN:    • INFYTQ PREPARATION TIPS& EXAMPLE PROB...  



FOLLOW THE GROUP FOR INFORMATION RELATED TO INFYTQ : LINK TO JOIN TELEGRAM GROUP : https://t.me/infyrqhelp

#infytq #infosys