Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code help?
#15
(May-21-2020, 01:50 PM)GOTO10 Wrote:
(May-21-2020, 01:34 PM)pyzyx3qwerty Wrote: In your code, it should be
str(float(num_burgers*cost_burgers)))

I don't think this works, because num_burgers is obtained by input() and is therefore a string until converted.

Well I was about to post that too and he could change it by placing float() before the inout(), but @deanhystad explained the whole thing

(May-21-2020, 07:56 PM)Beau Wrote: the f' function I can see will save a lot in the long run.. do you by any chance have a tutorial for better understanding you could point me in the direction of??
Dunno if you are talking about formatted strings but if by any chance you are, well here you go:-
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
Reply


Messages In This Thread
Code help? - by Beau - May-21-2020, 12:17 PM
RE: Code help? - by GOTO10 - May-21-2020, 12:30 PM
RE: Code help? - by Beau - May-21-2020, 12:56 PM
RE: Code help? - by GOTO10 - May-21-2020, 01:20 PM
RE: Code help? - by pyzyx3qwerty - May-21-2020, 01:34 PM
RE: Code help? - by GOTO10 - May-21-2020, 01:50 PM
RE: Code help? - by pyzyx3qwerty - May-22-2020, 10:06 AM
RE: Code help? - by Beau - May-21-2020, 01:38 PM
RE: Code help? - by deanhystad - May-21-2020, 01:48 PM
RE: Code help? - by Beau - May-21-2020, 01:48 PM
RE: Code help? - by Beau - May-21-2020, 02:00 PM
RE: Code help? - by GOTO10 - May-21-2020, 02:04 PM
RE: Code help? - by Beau - May-21-2020, 02:10 PM
RE: Code help? - by deanhystad - May-21-2020, 02:36 PM
RE: Code help? - by Beau - May-21-2020, 07:56 PM

Forum Jump:

User Panel Messages

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