import turtle as t
t.shape('turtle')
color=float(input('turtle color==>')
t.pencolor("color")
I don't understand why there is an error. Numbers work, but strings don't work.
python
>>> float("33")
33.0
>>> float("abcde")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
float("abcde")
ValueError: could not convert string to float: 'abcde'
>>> float(input(""))
11.11
11.11
>>> float(input(""))
1
1.0
>>> float(input(""))
red
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
float(input(""))
ValueError: could not convert string to float: 'red'
>>>
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
885 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
572 Understanding How to Configure Google API Key
597 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.