Oct-22-2018, 04:24 AM
(This post was last modified: Oct-22-2018, 04:24 AM by hobbyprogrammer.)
Hi, I'm new to python, about a couple of months learning on my own,
I see that people are very helpful on this forum, I have a dilemna on this program I'm writing.
It would seem that the print ("test") statement should not print, when user enters "N" because the flag redo is set to "1"
yet it still runs that line of code.
Here is the program.
I see that people are very helpful on this forum, I have a dilemna on this program I'm writing.
It would seem that the print ("test") statement should not print, when user enters "N" because the flag redo is set to "1"
yet it still runs that line of code.
Here is the program.
import os class klass: '"docstring'" def_init_(self): self.attribute="var" if len(self.attribute) <2: pass #my program snippet starts here redo=0 while redo==0: srch=0 while srch==0: user=input("would you like to do a search of the list? (Y/N) ") if user=="n": srch=1 redo=1 print ("test") print ("done")