On 02/16/2015 11:27 AM, Courtney Skinner wrote:
Hello,
I am trying to build a program that approximates the value of cosine - this is
my program so far. It is not returning the right values. Could you tell me what
I am doing wrong?
You've got several answers that point out several problems
Courtney Skinner wrote:
> Hello,
>
> I am trying to build a program that approximates the value of cosine -
> this is my program so far. It is not returning the right values. Could you
> tell me what I am doing wrong?
>
>
> def main():
>
> import math
>
> print("This program appro
On 16/02/15 16:27, Courtney Skinner wrote:
Hello,
I am trying to build a program that approximates the value of cosine
def main():
import math
Its usual to do the imports outside the function at the tyop of the
file. Python doesn't actually care much but its 'standard practice'.
On 16/02/2015 16:27, Courtney Skinner wrote:
Hello,
I am trying to build a program that approximates the value of cosine - this is
my program so far. It is not returning the right values. Could you tell me what
I am doing wrong?
def main():
import math
Not that it matters but imports
Hi Jason,
On 19 January 2012 13:02, Jason Loeve wrote:
> good day i seem to be stuck, my code is
>
> from sys import argv
>
> script, user_name = argv
>
> and i get an error ValueError: need more than 1 value to unpack
>
The implication of this message is that the value of "argv" contains only
If I say that sys.argv is a list, does that help you?
Also, run things from a command prompt for this kind of thing, at least then
you can guarantee what args get passed
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: Jason Loeve
Sender: tutor-bounces+bodsda
On Thu, Jan 19, 2012 at 6:32 PM, Jason Loeve wrote:
> good day i seem to be stuck, my code is
>
> from sys import argv
>
> script, user_name = argv
>
Are you passing an additional parameter while executing the script ?? you
must execute it passing an additional parameter which will get assigned