Python Forum
string to float conversion fails
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string to float conversion fails
#4
(Feb-21-2024, 04:56 PM)PetarPetrenko Wrote: a = float(input("Vnesi ja osnovata a = "))
This question/answer excapes me.
When I run the above code, I get exactly what is intended.
enter 17, you get 17.0.
?
Paul
(win 11, python 3.11.2, Idle)
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
string to float conversion fails - by PetarPetrenko - Feb-21-2024, 04:56 PM
RE: string to float conversion fails - by DPaul - Feb-21-2024, 06:21 PM
RE: string to float conversion fails - by DPaul - Feb-22-2024, 09:41 AM
RE: string to float conversion fails - by DPaul - Feb-22-2024, 04:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error could not convert string to float: deadendstreet 4 5,517 Oct-02-2019, 05:49 PM
Last Post: ichabod801
  ValueError: could not convert string to float: 'Pencil' Balakay97 3 5,993 Mar-08-2018, 07:30 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020