Greetings Sam,
>Hello,I am hoping you experts can help out a newbie.I have written
>some python code to gather a bunch of sentences from many files.
>These sentences contain the content:
>
>blah blah blah blah 1-up printingblah blah blah blah
>blah blah blah blah
>blah blah Presetblah blah bla
On 24/03/16 18:12, Tom Maher wrote:
> raw_input('your input ')
Raw input returns a value, you need to store it somewhere like:
value = raw_input('your input ')
> while raw_input != 'c' or 'h' or 'l':
Then you need to compare vale not the function name.
(Did you learn BASIC at some point maybe?
On 24/03/16 21:03, Sam Starfas via Tutor wrote:
> I have written some python code to gather a bunch
> of sentences from many files.
> These sentences contain the content:
OK, They are presumably lines and not sentences.
Lines end in a newline character and sentences end
with a period. So they are
Here is a simple game I am trying to create:
print "pick a number between 0 and 100 and tell me if it my guess is too
high (h) too low (l) or correct (c)"
guess = 0
print 'my guess is 50'
raw_input('your input ')
n = 50
while raw_input != 'c' or 'h' or 'l':
if raw_input == 'h':
Hello,I am hoping you experts can help out a newbie.I have written some python
code to gather a bunch of sentences from many files. These sentences contain
the content:
blah blah blah blah 1-up printingblah blah blah blah
blah blah blah blah
blah blah Presetblah blah blah blah
blah blah blah P