[Tutor] Python Programming Help
Amit Saha
amitsaha.in at gmail.com
Wed Sep 11 11:48:34 CEST 2013
Hi Katie,
On Wed, Sep 11, 2013 at 11:01 AM, Katie <xrandomheartzx at aim.com> wrote:
> Hello,
>
> I am a beginner in computer programming. I am studying math, and the math
> class that I will be taking requires knowledge in Python. So, I am in a
> computer science class. Therefore, I do not have an in-depth knowledge of
> computer programming.
Welcome to the forum and welcome to the world of programming!
>
> I am currently trying to write a program in Python version 2.7.5 that uses
> the math module to compute sinh(x) = 1/2(e^x - e^(-x)) in three ways for a
> given value of x:
> 1a) by using the sinh function
> 1b) by using the exp function
> 1c) by using the value of e and the exponentiation operator **
>
> 2. Print the results and note any differences that appear.
>
> So, I know that I have to create a NotePad file so that I can import that
> into my command prompt.
>
> In my NotePad file, I have the following...I'm not sure if I am even going
> about doing this problem correctly...
Okay, so when you are programming, there are two things you do to see
the result of your programs:
1. First, you write the program. You write this in an text editor.
Notepad is a text editor (There are better options, but let's keep it
as it is for now)
2. Then, you run the program. Sometimes you can run the program from
the editor itself, such as in IDLE. Other times, you have to run it
separately.
So, before you write the solution to the programming problem above,
can you first try to write a program and then run it? What operating
system are you working? If you are on Windows, can I suggest you to
take a look at these videos I created a while back and they may help
you: http://www.youtube.com/playlist?list=PLD0rs_vnIQS5r8IhNpu0rWIAyKpTX34yo
Only when you have written your first program, which is really simple,
you should try to attempt your exercise.
Hope that helps.
-Amit.
--
http://echorand.me
More information about the Tutor
mailing list