Issue with my code

2013-02-05 Thread maiden129
Hi, I'm trying to create this program that counts the occurrences of each digit in a string which the user have to enter. Here is my code: s=input("Enter a string, eg(4856w23874): ") s=list(s) checkS=['0','1','2','3','4','5','6','7','8','9'] for i in s: if i in checkS: t=s.count(i

Re: Issue with my code

2013-02-05 Thread maiden129
Also I’m using Python 3.2.3. On Tuesday, February 5, 2013 1:38:55 PM UTC-5, maiden129 wrote: > Hi, > > > > I'm trying to create this program that counts the occurrences of each digit > in a string which the user have to enter. > > > > Here is my code:

Re: Issue with my code

2013-02-05 Thread maiden129
On Tuesday, February 5, 2013 1:56:55 PM UTC-5, marduk wrote: > On Tue, Feb 5, 2013, at 01:38 PM, maiden129 wrote: > > > Hi, > > > > > > I'm trying to create this program that counts the occurrences of each > > > digit in a string which the user h

Re: Issue with my code

2013-02-05 Thread maiden129
How to reverse the two loops? On Tuesday, February 5, 2013 2:43:47 PM UTC-5, Dave Angel wrote: > On 02/05/2013 02:20 PM, maiden129 wrote: > > > On Tuesday, February 5, 2013 1:56:55 PM UTC-5, marduk wrote: > > >> On Tue, Feb 5, 2013, at 01:38 PM, maiden129 wrote: > &g

Struggling with program

2013-02-17 Thread maiden129
I'm trying to do this assignment and it not working, I don't understand why... This is what I have to do: Write the definition of a class Player containing: An instance variable name of type String , initialized to the empty String. An instance variable score of type int , initialized to ze

Python GUI questions

2013-03-19 Thread maiden129
Hello, I'm using python 3.2.3 and I'm making a program that show the of occurrences of the character in the string in Tkinter. My questions are: How can I make an empty Entry object that will hold a word that a user will enter? How to make an empty Entry object that will hold a single charact

Re: Python GUI questions

2013-03-19 Thread maiden129
On Tuesday, March 19, 2013 5:39:51 PM UTC-4, Chris Angelico wrote: > On Wed, Mar 20, 2013 at 6:01 AM, maiden129 wrote: > > > Hello, > > > > > > I'm using python 3.2.3 and I'm making a program that show the of > > occurrences of the character in

Re: Python GUI questions

2013-03-19 Thread maiden129
On Tuesday, March 19, 2013 8:57:42 PM UTC-4, Rick Johnson wrote: > On Tuesday, March 19, 2013 2:01:24 PM UTC-5, maiden129 wrote: > > > Hello, > > > > > > I'm using python 3.2.3 and I'm making a program that show > > > the of occurrences

Re: Python GUI questions

2013-03-19 Thread maiden129
On Tuesday, March 19, 2013 10:16:25 PM UTC-4, Rick Johnson wrote: > On Mar 19, 8:25 pm, maiden129 wrote: So should I redo my other code that I created with the radioButtons to change the colors of a text? from tkinter import * class buttons: def __init__(self): window =

Global NameError Fix?

2013-03-21 Thread maiden129
Hello, I'm using the version 3.2.3 of Python and I am having an issue in my program and I don't know how to fix it: counterLabel["text"] = str(counter) NameError: global name 'counterLabel' is not defined Here is my program: from tkinter import * class CounterButton(Button): def __init_