Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coding error.
#1
I am using Python programming by John Zelle. I am trying to work on the example on page 12. I am coding exactly as it is coded in the example. I am getting the error message "Can't multiply sequence by non-int of the type float" What do I need to do to correct this?
Regards,
Butch
Reply
#2
Post your code, using BBcode tags.
What you expect are first and second multiplier?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Quote:I am coding exactly as it is coded in the example
It is so cute when new programmers say this. You don't know what to look for, of course you cannot see the error you made. Unless you copied the example and pasted it in your file, you made a transcription error. It is nearly impossible not to. Probably an indenting error.

Next time, post the entire error message, including the trace. This usually includes enough information to identify and correct the error.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Coding error. Can't open directory EddieG 6 1,138 Jul-13-2023, 06:47 PM
Last Post: deanhystad
  Coding Error EddieG 2 550 Jul-09-2023, 02:59 AM
Last Post: EddieG
  python coding error isntitzee 1 2,218 Oct-17-2020, 06:30 AM
Last Post: buran
  Coding error- Not sure where I have put error markers against the code that is wrong Username9 1 1,740 Sep-28-2020, 07:57 AM
Last Post: buran
  coding error iro a menu Rollo 2 2,102 Sep-27-2020, 04:17 PM
Last Post: deanhystad
  Adafruit LIS3DH coding error FitDad73 1 2,011 Aug-30-2020, 01:37 AM
Last Post: bowlofred
  Coding error- help FatherYeals 3 33,408 Mar-27-2020, 02:11 PM
Last Post: deanhystad
  name undefined Coding Error Ewilliam51 2 2,148 Feb-06-2020, 12:19 AM
Last Post: Ewilliam51
  coding error bilawal 11 5,466 Dec-07-2019, 05:23 PM
Last Post: DreamingInsanity
  Pyhton Coding Help Needed (very small error) friduk 2 2,460 Oct-23-2019, 08:41 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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