 CoCalc Public FilesLab 1 / Lab1-turnin.ipynb
Author: Valerie Doan
Views : 37
Compute Environment: Ubuntu 20.04 (Default)
In :
# Name:Valerie Doan
# I worked on this code with: Abigail, Sophia, and Vanessa

# Please do all of your work for this week's lab in this worksheet. If
# you wish to create other worksheets for scratch work, you can, but
# this is the one that will be graded. You do not need to do anything
# to turn in your lab. It will be collected by your TA at the beginning
# of (or right before) next week’s lab.

# Be sure to clearly label which question you are answering as you go and to


In :
#1
3

3
In :
#2
1775

1775
In :
#3
2*2

4
In :
#4
10/4

5/2
In :
#5
1775/6

1775/6
In :
#6
1775/6.

295.833333333333
In :
#7
2.5^6

244.140625000000
In :
#8
mice=3
mice

3
In :
#9
prod=7*94
prod

658
In [ ]:
#10
#the function 2*26 is assigned to the variable a
#the function 12*29 is assigned to the variable b
#the function a*b is assigned to the variable val
#val is called on so the numerical value can be displayed

In :
#11
a=67*45
b=93*442
sum=a+b
sum

44121
In :
#12
sq=sqrt(76.2+35.1)
sq

10.5498815159223
In :
#13
bignum=mice^20
bignum


3486784401
In :
#14
100

100
In [ ]:
#15
#The line dalmations=dalmations + 1 adds the 1 to the previous value of the dalmations variable

In :
#16
num=5
num=num+2
num

7
In :
#17
sqrt(37.)

6.08276253029822
In :
#18
ln(27.5)

3.31418600467253
In :
#19
sqrt(abs(625.-810.))

13.6014705087354
In :
#20
sqrt(ln(5.^8.7))

3.74193931513816
In :
#21
c=abs(625-810.)
d=sqrt(c)
d
e=ln(5.^8.7)
f=sqrt(e)
f

13.6014705087354
In :
#22
abs=-2
g=abs(abs)

--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-36-808ab59b5443> in <module>() 1 #23 2 abs=-Integer(2) ----> 3 g=abs(abs) TypeError: 'sage.rings.integer.Integer' object is not callable 
In :
#23
ln(35.0)

3.55534806148941
In :
#24
plot(sqrt(x), (x,0,1000)) In :
#25
plot(abs(x), (x,-10,10)) In :
#26
plot(5*x^4, (x,-2,2), color="green") In :
#27
plot(x^3, (x,-5,5), color="pink") + plot(2*x^2, (x, -5, 5), color="purple") 