def res(vys): for x in vys: print(x) try: s = int(input("s ")) p = 0 lst = [] if s >=1 and s <=100: while p<s: z = input("z ") if len(z) >= 1 and len(z) <= 50: try: num = int(z) kys = type(num) == int except: kys = z.isupper() if kys == True: pal = z[::-1] if z == pal: txt = "yes" else: txt = "no" else: txt = "syntax" else: txt = "syntax" p = p+1 lst.append(txt) print("") res(lst) else: print("syntax") except: print("syntax")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter