Go to advanced search

by bobadopalis
Sun Jul 22, 2012 3:53 pm
Forum: Python
Topic: Python beginner help
Replies: 8
Views: 1712

Re: Python beginner help

I posted it on my phone and for some reason the indents were missed out when i posted... the elif was what i was after originally thank you. But the second one definatly looks a lot cleaner and simpler. I haven't got as far as dictionary's yet, looks straight forward enough, do you know of any good ...
by bobadopalis
Sun Jul 22, 2012 12:58 pm
Forum: Python
Topic: Python beginner help
Replies: 8
Views: 1712

Re: Python beginner help

One more question as I got such a fast response last time. Here's an example of what I've got so far. x = raw_input ('print name') if x.lower () == 'name1': print (' custom response1') if x.lower () == 'name2': print (' custom response2') if x.lower () == 'name3': print (' custom response3') else: p...
by bobadopalis
Sun Jul 22, 2012 12:08 am
Forum: Python
Topic: Python beginner help
Replies: 8
Views: 1712

Re: Python beginner help

The 2nd one was what I was after, tried doing that and it wouldn't work, turns out I missed the : out. Thank you i would have been there for hours trying to work it out.

The X was a typo from my phone, i leart the hard way about python being case sensitive
by bobadopalis
Sat Jul 21, 2012 8:55 pm
Forum: Python
Topic: Python beginner help
Replies: 8
Views: 1712

Python beginner help

Hi is it possible to set up an if statement to check an inputed name? And then output a string dependent on the name? I cant seem to work it out. So far i have: X = raw_input ('what's your name') If x == print ('hello' + x + 'your awesome') I've tried a few ways including; if x == a with a defined a...

Go to advanced search