Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

7/6/2019 exercises01

Part 1: Exercises
Note only parts 3 and 4 are for submission.

1. Use Python to perform the following calculations (read the notes for multiplying brackets etc).
852(53 + 27) − 72(405)
A.
24
π
B. 3 ( )
4
−−
C. √20

7
D.
6

E. e2
F. e
−1

4 −8
4 2
G. 2
8
7 3 9
H. + −
2 8 10
2. Create a folder for Python in your documents folder (Libraries > Documents > (Right-click: New Folder)
Python). This is where you can save all the files you download and create for this part of the unit. If you
accumulate a lot of files, you may find it useful to use further subfolders to keep everything organised.
3. Start Spyder and start a new script (following the online instructions here
(https://people.bath.ac.uk/nm268/progpy.bho/install.html#spyder)). Save it to the folder you made in 2.

make it print "Hello World!" on one line (check the spelling, capitalisation and
exclamation mark!)
then print the result of calculating 6 × 7 on the next
4. Close Spyder and restart it (or restert the kernel) to make sure the memory is empty, then test your
script works again from scratch.
Now upload it to moodle before Wednesday for me to check you can do this correctly (this counts 2%
of your marks for this unit).

https://people.bath.ac.uk/nm268/progpy.bho/exercises01.html 1/1

You might also like