"Bryan Fodness" <[EMAIL PROTECTED]> wrote
>I cannot get this to work either.
Brian, when you post please tell us exactly what does not work.
If there is an error message send the whole error there is a lot
of useful information in them. Otherwise we have to read your
code and guess what might be
I think you need to use "raw_input" instead of "input". input "eval" the
input expression while "raw_input" just stores it. I find the module help
very handy when I am in doubt.
>>> print raw_input.__doc__
raw_input([prompt]) -> string
Read a string from standard input. The trailing newline is s
I cannot get this to work either.
woffaxis = 7
if woffaxis != 0:
woaf_pos = input("What is Wedge Direction (N/A, Lateral, Towards Heal,
Towards Toe)?")
if woaf_pos == 'Towards Toe':
woffaxis = woffaxis
elif woaf_pos == 'Towards Heal':
woffaxis = (woffaxis * -1)
else:
woffaxis
On 25/10/2007, Bryan Fodness <[EMAIL PROTECTED]> wrote:
> I have the following code, it keeps giving me a value of 1 for e.
>
> for line in file('21Ex6MV_oaf.dat'):
> oa, openoa, w15, w30, w45, w60 = line.split()
> if (float(oa) == round(offaxis)) and (eff_depth < 10 and unblockedFS >
> 15)
Right above the empty reply box is a "reply to all" link. Hit it, and you're
good to go.
On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
Dang it... I am really going to have to figure out how to reply all.
The cc thing only worked once and now I'm still sending to you.
On 5/30/07, Adam Urbas
Dang it... I am really going to have to figure out how to reply all.
The cc thing only worked once and now I'm still sending to you.
On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> I started to read Alan Gauld's tutorial. The problem is, once I get
> past the very basics of something, I tend
ok well, I'm testing to see if the CC thing worked.
On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> I'll try the CC thing.
>
> On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > Well, Brian, I am now very sure that we have different versions of
> > gmail, because on both the Quick Reply and
adam urbas said unto the world upon 05/29/2007 12:39 PM:
> The scary part is, I think I understand this. I copied your last
> example and put it in IDLE and it doesn't like you code. Never
> mind. I figured it out. So that is so it will notify you if your
> choice is invalid. Nice lil tidbit o
Date: Sun, 27
May 2007 15:10:08 -0400> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC:
tutor@python.org> Subject: Re: [Tutor] trouble with "if"> > adam urbas said
unto the world upon 05/27/2007 01:49 PM:> > Thank you for the help Brian. I
would like to ask
* Rikard Bosnjakovic (Mon, 28 May 2007 17:55:42 +0200)
> On 5/28/07, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> > Do you really think someone can or will read what you wrote? I've
> > never seen something so horribly formatted like you emails - and I've
> > seen lots of awful formatted emails...
>
On 5/28/07, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> Do you really think someone can or will read what you wrote? I've
> never seen something so horribly formatted like you emails - and I've
> seen lots of awful formatted emails...
Looks fine at my end.
--
- Rikard - http://bos.hack.org/cv/
adam urbas wrote:
> Very frustrating. What is a non-int and what is 'str'? Why can't it
> multiply the sequence? I guess I should include the program I'm using
> for these things.
These are more examples of the same kinds of errors you have been having.
Values in Python have a type. Some ex
rototype of radiacir.py, a test version. You
know, I should probably try that int trick, which I seem to have forgotten.
And guess what that did it. It's amazing when you apply the things that you
learn. Apparently I am quite absent minded. Well It seems
I don't need any of this h
I thank you much Alan. This has been very helpful already and I'm only on page
2. The world needs more newb-friendly people like you.> To: tutor@python.org>
From: [EMAIL PROTECTED]> Date: Thu, 24 May 2007 23:39:41 +0100> Subject: Re:
[Tutor] trouble with "if">
t int trick, which I seem to have
forgotten. And guess what that did it. It's amazing when you apply the things
that you learn. Apparently I am quite absent minded. Well It seems I don't
need any of this help anymore. Oh well. Thanks anyway.Au > To:
tutor@python.org> Fro
adam urbas said unto the world upon 05/27/2007 01:49 PM:
> Thank you for the help Brian. I would like to ask you about these
> things. Which one of the examples you gave would be most fool
> proof.
Hi Adam and all,
Adam was asking about how to use raw_input to drive a basic command
prompt m
Thank you for the help Brian. I would like to ask you about these things.
Which one of the examples you gave would be most fool proof.> Date: Wed, 23 May
2007 13:40:09 -0400> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC:
tutor@python.org> Subject: Re: [Tutor] trouble wi
Hi adam.
With the aid of Google it seems a Ti83 is a programmable calculator.
I'm not sure what python tutor you are using but it looks like
you need to cover some very basic stuff around data types.
You may find the Raw Materials topic in my tutor useful to give
you a feel for the different
"adam urbas" <[EMAIL PROTECTED]> wrote
> It won't even accept words.
> I can only get it to accept numbers.
try this(untested code!):
number = None
data = raw_input('Type something: ')
try: number = int(data)
except: data = data.split()# assume a string
if number:# user entered a
I'm not sure what the whole indentation thing is for. And now I'm having
trouble with the if statement things.
Maybe your if statement troubles have been solved by others by now, but I'll
just add that "the indentation thing" is a vital feature of Python, it is
the way to separate code blocks
Hi Adam,
adam urbas wrote:
> when I input a radius, it says:
>
> can't multiply sequence by non-int of type 'float'
...
> > radius=raw_input("Enter Radius:")
> > diameter=(radius*2)
After you collect the raw_input for the radius, the radius variable
contains a string, not a number (that's what
> satisfied now, with the whole feeding). Well if I understood what
> 'str' meant, then I could probably figure the rest out. Well I
> have to go do other things so I'll save the rest of this figuring
> out till later.I shall return,Adam> Date: Wed, 23 May 2007 12
re the rest out.
Well I have to go do other things so I'll save the rest of this figuring out
till later.I shall return,Adam> Date: Wed, 23 May 2007 12:12:16 -0400> From:
[EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: tutor@python.org> Subject: Re:
[Tutor] trouble with &qu
;t want me to multiply by
pi. PLEASE HELP!!!thanks in advance,Adam> Date: Wed, 23 May 2007 18:08:20
+0200> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> Subject: Re: [Tutor]
trouble with "if"> CC: tutor@python.org> > The problem is with types. The
outcome of
AIL PROTECTED]> To: [EMAIL PROTECTED]> Subject:
Re: [Tutor] trouble with "if"> CC: tutor@python.org> > The problem is with
types. The outcome of raw_input is a string. But> if you give the line:> > if
shape == 1:> > you are comparing it with a number. The t
adam urbas wrote:
> Hi all,
>
> I've been working with this new program that I wrote.
...
> #"User's Choice:"
> shape=raw_input("> ")
>
> #"Select Given:"
> if shape == 1:
...
[EMAIL PROTECTED]:~$ python
Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubunt
adam urbas said unto the world upon 05/23/2007 11:57 AM:
>
> Hi all,
>
> I've been working with this new program that I wrote. I started out
> with it on a Ti-83, which is much easier to program than python. Now
> I'm trying to transfer the program to python but its proving to be quite
> dif
The problem is with types. The outcome of raw_input is a string. But
if you give the line:
if shape == 1:
you are comparing it with a number. The text "1" is not equal to the
number 1, so this evaluates to False.
Instead you should do:
if shape == "1":
To also be able to type 'circle' instead
28 matches
Mail list logo