Python Forum
Simple Function Problem, please help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Function Problem, please help
#1
def columncheck(c):
    x=5
    pos=False
    while pos != True:
        if dboard[x][(4*c)-1]== " ":
            pos=True
        elif dboard[x][(4*c)-1] != " ":
            x-=1
    return x
When this function returns x, x is always 5.

Why?

It has been annoying me for days.
Reply


Messages In This Thread
Simple Function Problem, please help - by ShadowWarrior17 - Dec-28-2017, 02:17 AM
RE: Simple Function Problem, please help - by mpd - Dec-28-2017, 02:43 AM
RE: Simple Function Problem, please help - by mpd - Jan-02-2018, 01:50 PM
RE: Simple Function Problem, please help - by mpd - Jan-02-2018, 11:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  A simple problem, how best to solve it? SuchUmami 2 753 Sep-01-2023, 05:36 AM
Last Post: Pedroski55
  How to solve this simple problem? Check if cvs first element is the same in each row? thesquid 2 1,279 Jun-14-2022, 08:35 PM
Last Post: thesquid
Big Grin question about simple algorithm to my problem jamie_01 1 1,714 Oct-04-2021, 11:55 AM
Last Post: deanhystad
  simple login problem MMOToaster 2 2,436 Feb-25-2020, 09:28 AM
Last Post: MMOToaster
  got SyntaxError while building simple function zarize 2 2,156 Feb-14-2020, 10:51 AM
Last Post: zarize
  Problem with simple 3D Vektor calculation Pythocodras 0 1,736 Dec-11-2019, 07:18 PM
Last Post: Pythocodras
  Simple statistics with range function Pythonlearner2019 2 2,161 Nov-25-2019, 05:25 PM
Last Post: Pythonlearner2019
  Simple problem. looking for an efficient way silverchicken24 3 2,366 Oct-14-2019, 07:13 PM
Last Post: Larz60+
  Cannot get simple i/o to function. jerryi 10 6,803 Jul-27-2019, 06:22 PM
Last Post: jerryi
  simple string & input problem kungshamji 5 3,724 Jun-23-2019, 03:54 PM
Last Post: kungshamji

Forum Jump:

User Panel Messages

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