Python Forum
making a program for counting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
making a program for counting
#4
There are several problems here. First is that you didn't use python tags like I asked you to. Indentation is important in python, and without those tags I can't see what your indentation is. Assuming the indentation is correct, the second problem is that capitalization matters. The variable Text is not the same as the variable text, and the variable I is not the same as the variable i. I is a bad name for a variable, anyway. Try something more descriptive, like rows. The third problem is the condition i < 0. I is probably going to be positive when entered, and you increase it by one each time through the loop. Therefore it will never be less than zero. You probably want to decrease it each time through the loop, and test that it is greater than zero. Finally, you are adding the wrong thing to sum.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
making a program for counting - by hurmet - Sep-30-2017, 06:16 PM
RE: making a program for counting - by ichabod801 - Sep-30-2017, 07:06 PM
RE: making a program for counting - by hurmet - Sep-30-2017, 07:14 PM
RE: making a program for counting - by ichabod801 - Sep-30-2017, 07:22 PM
RE: making a program for counting - by buran - Sep-30-2017, 07:25 PM
RE: making a program for counting - by hurmet - Sep-30-2017, 07:54 PM
RE: making a program for counting - by gruntfutuk - Oct-01-2017, 04:36 PM
RE: making a program for counting - by buran - Oct-01-2017, 05:06 PM
RE: making a program for counting - by gruntfutuk - Oct-01-2017, 06:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Making maths .py program faster Shutcois 1 2,695 Feb-16-2018, 06:39 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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