beginner question about a code for converting inch(es) to cm
Hi, I have just started learning Python and am a total newbie. Besides SoloLearn I am using a book designed for beginners which came with a CD with an IDLE on it. I am already having problems with the 3rd exercise, which is to write a code for converting inch(es) to cm. inch=2.54 print("Please enter a value for inch.") xi=float(input()) xcm=xi*inch print(xi, "inch(es) equal", xcm, "cm") playground: https://code.sololearn.com/c7D39UG6OhIF The code seems to work in playground. It is also the sample solution given in the book (keep in mind, this is the very start of the book...). I had to look up the sample solution because I kept getting errors when creating own codes in the IDLE. Unfortunately, even the sample solution does not work in the IDLE: Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> xi=float(input()) ValueError: could not convert string to float: As the code works with playground, I am thinking that something is wrong with the IDLE. I hope you guys can help me.