Project 0

You should try to download a personal copy of Sage or make sure you can use one of the online servers available to you. Then, complete the following tasks.

1. Perform a basic calculation of your choice using multiplication, addition and division.

2. Learn how to use the plot command to plot the function $f(x)=e^{-x}\sin(x)$ on the domain $-2\leq x\leq 2$ and plot the curve using a dashed line that is a color other than blue.

3. Using the fact that the command

E=[2*i for i in [0..50]]


makes E the list of even integers up to 100 (after entering the command type E and return to see this list), change the code to create a list O that will be the set of odd integers up to 100 (without typing them in by hand).

4. What happens if you perform the following command?

[0,1,2]+[3,4,5]


Is that what you would expect or not?

5. Using the parametric plot feature, draw the graph of anything you want (either come up with your own drawing, or find a cool looking curve online such as the Batman curve from the video, which was actually drawn using implicit plots).

Remark: To input text and not get an error, the easiest way is to enclose the text in single quotation marks. For instance

'This is text'


should output the string when you evaluate the code. This will provide you with a way to answer explanation questions on the Sage projects. If you want to avoid the quotation marks showing up, you can type

print 'This is text'

page revision: 7, last edited: 10 Sep 2012 16:01