Aug-11-2018, 05:00 PM
hey guys, I am new to python programming. I was practising a program that prints first half of a string. But I cant run the code. please identify the error I am making
--Special Variable
--length={int}6
--str={str}computer
What am I doing wrong
str=input("enter any string") length=(len(str)) if length%2==0: length=len(str) half=str[0:length/2] print(half) else: print("input even no. string")Above code is giving me following error in line number 5 in pycharm
--Special Variable
--length={int}6
--str={str}computer
What am I doing wrong