0% found this document useful (0 votes)
57 views1 page

Part 1: Exercises: Exclamation Mark!)

The document provides instructions for completing Python exercises: 1. Calculate various mathematical expressions. 2. Create a Python folder to save files. 3. Use Spyder to create a script that prints "Hello World!" and the result of 6 × 7. 4. Close and restart Spyder, then re-run the script and submit it for marks.

Uploaded by

nabeel najjar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views1 page

Part 1: Exercises: Exclamation Mark!)

The document provides instructions for completing Python exercises: 1. Calculate various mathematical expressions. 2. Create a Python folder to save files. 3. Use Spyder to create a script that prints "Hello World!" and the result of 6 × 7. 4. Close and restart Spyder, then re-run the script and submit it for marks.

Uploaded by

nabeel najjar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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