My problem is when I enter a number in the input field, it becomes number with special character. I don't know why it's adding extra characters to input. You can see the example. I entered just 5.2 and it became '5.2&
"""
length of rectangle = a
width of rectangle = b
calculate the area and perimeter of the rectangle
"""
a = 6
b = float(input("width: "))
area = a*b
perimeter = (2*a) + (2*b)
print("area: " + str(area) + " perimeter: " + str(perimeter))
File "c:\Users\HP\OneDrive - Karabuk University\Belgeler\Downloads\first.py", line 8, in <module>
b = float(input("width: "))
ValueError: could not convert string to float: '5.2&
Could you please help me?