Programming with Python
python exercise
The purpose of this training assignment is to take your very first steps in Python. We will see how to use Python as a simple calculator, how to write an easy scriptusing variables and lists and how to make a plot (with the module matplotlib). You should start working on these training assignment during the scheduled computerlab hours and complete them on your own at home.
Premisses
Don’t forget to import the required modules for these tasks by executingfrom numpy import *from matplotlib.pyplot import *import sysIf you get an error message of the formNameError: name ’arctan’ is not definedyou forgot at least one of these steps.Task 1Run in an IPython shell (console window at the down right corner of your Spyderwindow) the following two commands to check, that you installed the correctversion of Python:sys.versionIf you got a version number ≥ 3.7, then the version is the correct one for this course.1 Programming with Python
Programming with Python
The purpose of this training assignment is to take your very first steps in Python.
We will see how to use Python as a simple calculator, how to write an easy script using variables and lists and how to make a plot (with the module matplotlib).
You should start working on these training assignment during the scheduled computer lab hours and complete them on your own at home.
Premisses
Don’t forget to import the required modules for these tasks by executing
from numpy import * from matplotlib.pyplot import * import sys
If you get an error message of the form
NameError: name ’arctan’ is not defined
you forgot at least one of these steps.
Task 1
Run in an IPython shell (console window at the down rig...
👀 Other Visitors are Viewing These Other Coursework Samples:
- Module 10 Summary. IT & Computer Science Coursework. What is web analytics?1 page/≈275 words | Other | IT & Computer Science | Coursework |
- Engine sizeID modelDescription Suffix Name. Relationship Modeling3 pages/≈825 words | Other | IT & Computer Science | Coursework |
- Coursework Assignment 2 Modelling: Analysis Class Diagram1 page/≈275 words | No Sources | Other | IT & Computer Science | Coursework |
- Harmful Speech—It’s Complicated: The Social Lives of Networked Teens2 pages/≈550 words | Other | IT & Computer Science | Coursework |
- Building GNU/Linux Bash Script that Monitors a Computer System and user Activity2 pages/≈550 words | No Sources | Other | IT & Computer Science | Coursework |
- IST 195 Project 2: Ethical Issues Analysis Computer Science Coursework1 page/≈275 words | No Sources | Other | IT & Computer Science | Coursework |
- Breakthrough in Parallel Computer Architecture Technology: Frontier1 page/≈275 words | 2 Sources | Other | IT & Computer Science | Coursework |