Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48945 > unrolled thread
| Started by | Борислав Бориславов <hexofbane@gmail.com> |
|---|---|
| First post | 2013-06-22 14:31 -0700 |
| Last post | 2013-06-22 18:35 -0700 |
| Articles | 7 — 5 participants |
Back to article view | Back to comp.lang.python
How can i fix this? Борислав Бориславов <hexofbane@gmail.com> - 2013-06-22 14:31 -0700
Re: How can i fix this? Peter Otten <__peter__@web.de> - 2013-06-22 23:46 +0200
Re: How can i fix this? Борислав Бориславов <hexofbane@gmail.com> - 2013-06-22 14:50 -0700
Re: How can i fix this? Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-22 16:55 -0600
Re: How can i fix this? John Gordon <gordon@panix.com> - 2013-06-23 00:53 +0000
Re: How can i fix this? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-22 22:53 +0100
Re: How can i fix this? Борислав Бориславов <hexofbane@gmail.com> - 2013-06-22 18:35 -0700
| From | Борислав Бориславов <hexofbane@gmail.com> |
|---|---|
| Date | 2013-06-22 14:31 -0700 |
| Subject | How can i fix this? |
| Message-ID | <b0872ec1-36c4-4e6f-9a5b-c826d508ea6c@googlegroups.com> |
while 1:
name=raw_input("What is your name? ")
if name == "bobi": print "Hello Master!" and break
else: print "error"
I want if my conditions are met to do a couple of things and i cant do that
[toc] | [next] | [standalone]
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2013-06-22 23:46 +0200 |
| Message-ID | <mailman.3707.1371937535.3114.python-list@python.org> |
| In reply to | #48945 |
Борислав Бориславов wrote:
> while 1:
> name=raw_input("What is your name? ")
> if name == "bobi": print "Hello Master!" and break
> else: print "error"
> I want if my conditions are met to do a couple of things and i cant do
> that
> while 1:
> name=raw_input("What is your name? ")
> if name == "bobi":
print "Hello Master!"
break
> else: print "error"
[toc] | [prev] | [next] | [standalone]
| From | Борислав Бориславов <hexofbane@gmail.com> |
|---|---|
| Date | 2013-06-22 14:50 -0700 |
| Message-ID | <54f1fb77-355b-4796-824f-1ee29c402720@googlegroups.com> |
| In reply to | #48946 |
23 юни 2013, неделя, 00:46:37 UTC+3, Peter Otten написа:
> Борислав Бориславов wrote:
>
>
>
> > while 1:
>
> > name=raw_input("What is your name? ")
>
> > if name == "bobi": print "Hello Master!" and break
>
> > else: print "error"
>
>
>
> > I want if my conditions are met to do a couple of things and i cant do
>
> > that
>
>
>
> > while 1:
>
> > name=raw_input("What is your name? ")
>
> > if name == "bobi":
>
> print "Hello Master!"
>
> break
>
> > else: print "error"
this doesent help me at all
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2013-06-22 16:55 -0600 |
| Message-ID | <mailman.3711.1371941776.3114.python-list@python.org> |
| In reply to | #48947 |
On Sat, Jun 22, 2013 at 3:50 PM, Борислав Бориславов <hexofbane@gmail.com> wrote: > this doesent help me at all It shows you how to include multiple statements in the body of the if block. If you're having trouble getting it to work, then please copy and paste the exact code that you're running for us along with the error message that you get. But we can't help you solve your problem if we don't know what it is.
[toc] | [prev] | [next] | [standalone]
| From | John Gordon <gordon@panix.com> |
|---|---|
| Date | 2013-06-23 00:53 +0000 |
| Message-ID | <kq5gto$7to$1@reader2.panix.com> |
| In reply to | #48947 |
In <54f1fb77-355b-4796-824f-1ee29c402720@googlegroups.com> =?UTF-8?B?0JHQvtGA0LjRgdC70LDQsiDQkdC+0YDQuNGB0LvQsNCy0L7Qsg==?= <hexofbane@gmail.com> writes:
> > > while 1:
> > > name=raw_input("What is your name? ")
> > > if name == "bobi":
> > print "Hello Master!"
> > break
> > > else: print "error"
> this doesent help me at all
Then you'll have to explain why, exactly, it doesn't help. Simply saying
"this doesn't help me" is very unhelpful to *us*.
Does it produce a syntax error?
Does it run, but produce the wrong output?
Some other reason?
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-06-22 22:53 +0100 |
| Message-ID | <mailman.3708.1371938005.3114.python-list@python.org> |
| In reply to | #48945 |
On 22/06/2013 22:31, Борислав Бориславов wrote:
> while 1:
> name=raw_input("What is your name? ")
> if name == "bobi": print "Hello Master!" and break
> else: print "error"
>
> I want if my conditions are met to do a couple of things and i cant do that
>
You most certainly can :)
while 1:
name=raw_input("What is your name? ")
if name == "bobi":
print "Hello Master!"
print "Why do some people insist on cramming all of their code
onto one line?"
break
else:
print "error"
--
"Steve is going for the pink ball - and for those of you who are
watching in black and white, the pink is next to the green." Snooker
commentator 'Whispering' Ted Lowe.
Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Борислав Бориславов <hexofbane@gmail.com> |
|---|---|
| Date | 2013-06-22 18:35 -0700 |
| Message-ID | <28f21825-4eb1-4969-854d-6d8b3bb81de0@googlegroups.com> |
| In reply to | #48945 |
okay i got it thank you all :))
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web