s = raw_input ("hello whats your name? ")
Hi there i am hoping some one could help me out with a small problem i am in the process of learning python.I am trying to write an interactive programme, This is a short example. if s = raw_input ("hello what’s your name? ") if s=='carmel': Print "Ahh the boss’s wife" What i would like to know is what if she don’t write carmel she rights say carm short of me writing if s=='carm': on a new line is there a shorter way of doing this so i can cover all angles on how she might write her name. Thanks nige -- http://mail.python.org/mailman/listinfo/python-list
raw_input
Hi there i am hoping some one could help me out with a small problem i am in the process of learning python. I am trying to write an interactive programme, This is a short example. if s = raw_input ("hello what's your name? ") if s=='carmel ': print "Ahh the boss's wife" What i would like to know is what if she doesn’t write carmel she rights say carm short of me writing if s=='carm': on a new line is there a shorter way of doing this so i can cover all angles on how she might write her name. Thanks nigeps I appologise for my earlier thread -- http://mail.python.org/mailman/listinfo/python-list
[no subject]
Hi there i am hoping some one could help me out with a small problem i am in the process of learning python. I am trying to write an interactive programme, This is a short example. if s = raw_input ("hello what’s your name? ") if s=='carmel': print "Ahh the boss’s wife" What i would like to know is what if she dont write carmel she rights say carm short of me writing if s=='carm': on a new line is there a shorter way of doing this so i can cover all angles on how she might write her name. Thanks nige -- http://mail.python.org/mailman/listinfo/python-list
Tkinter interactive
Hello i am fairly new to python, I have written an interactive programme a small example of it is here. s = raw_input ("Do you have any children? ") if s== 'yes': print "Thats great" elif s=='no': print "Well my boss has 2" Now i have also been looking at Tkinter if we take the basic "hello, world" programme which is like this. # File: hello1.py from Tkinter import * root = Tk() w = Label(root, text="Hello,!") w.pack() root.mainloop() What i want is to incorporate this in to my programme so when i start my programme a little box appears saying hello then my interactive programme runs within the box This it what it looks like from Tkinter import * root = Tk() w = Label(root, text="Hello,!") w.pack() s = raw_input ("Do you have any children? ") if s== 'yes': print "Thats great" elif s=='no': print "Well my boss has 2" The result of that is i just get another box open and start to run my interactive programme as though it ignores the Tk box which says hello hope this makes sense any advise on this please. thanks nige -- http://mail.python.org/mailman/listinfo/python-list
Graphical box /interactive programme
Hello i want to put an interactive text programme in to a graphical box this is a small section of my text programme s = raw_input ("Hello whats your name? ") if s=='melvyn': print "your my boss's Dad the one they call in indian language DEEP THOUGHT LITTLE HORSE" if s=='carol': print "ahhh you are my boss's mom the one they call WREATH WOMAN" if s=='rebecca': print "you must be the FLORIST WOMAN" if s=='gareth': print "you must be the one they call the TRUCKER" if s=='carmel': print "you must be my boss's wife" s = raw_input ("what do you do for a living? ") print "Ahh thats easy you dont do much then",s,"my boss is a Truck driver." these are the instructions for a graphical boxfrom Tkinter import * root = Tk() cv = Canvas(root, width=400, height=300, bg="blue") cv.pack() cv.create_rectangle(50,30,320,290,outline="yellow",fill="red",width=10) mainloop() any way what i would like to do is create a programme that would run my text programme from this graphical box i tried to add the code for the box to the top of my text programme but when i run it i get the graphical box come up and my text programme will not work untill i kill the box. i would be graet full if some body can help me acheive this. thanks nige -- http://mail.python.org/mailman/listinfo/python-list