I can't undestand over google translate very well what you problem is but:

if a="j" will always be true,


To compare if a equals 'j' you must use ==, change it to :
if a == "j"

Also, looking at documentation for raw_input:
https://docs.python.org/2/library/functions.html#raw_input

Look at the example how it should be used.

And you can't use a class like that, you could a function. While you can
use an __init__ method on a class to execute a function everytime you
create an object on that class.

And break is not necessary in the "else" clause.

I've attached the working-changed script.

2014-10-14 21:37 GMT+02:00 Perica Zivkovic <perica.zivko...@gmail.com>:

> Hi Marc,
>
> here is a simple description of Python class syntax and couple of
> examples.
>
> https://docs.python.org/2/tutorial/classes.html#a-first-look-at-classes
> http://stackoverflow.com/questions/7993089/classes-in-python-for-a-beginner
>
> kind regards,
>
> Perica
>
> 2014-10-14 21:03 GMT+02:00 Marc Stevens <ma...@ziggo.nl>:
>
>> Hallo, beste python gangers,
>>
>> Ik heb het volgende probleem simplistisch weergegeven in de bijlage.Ik
>> hoop dat het niet te basic is.Als het werkt kan ik dit bij complexere
>> programma’s toepassen.
>> Om delen van programma’s laten herhalen kun je in python met classes
>> werken en omdat je in python (dat afgeleid is van het langgeleden Basic)
>> geen adres regels heeft ,
>> kun je die die met een naam aan roepen
>>
>> Zou U mij kort kunnen vertellen wat ik in de bijlage verkeerd doe en hoe
>> ik een class correct aan roep?
>>
>>
>> _______________________________________________
>> Python-nl mailing list
>> Python-nl@python.org
>> https://mail.python.org/mailman/listinfo/python-nl
>>
>>
>
> _______________________________________________
> Python-nl mailing list
> Python-nl@python.org
> https://mail.python.org/mailman/listinfo/python-nl
>
>
class proefje:
    def __init__(self):
        x=0
        while x<5:
            print x
            x=x+1

a= raw_input("nog eens?j/n")

if a == "j":
    proefje()
_______________________________________________
Python-nl mailing list
Python-nl@python.org
https://mail.python.org/mailman/listinfo/python-nl

Antwoord per e-mail aan