Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 18fe284

Browse files
Added setup to readme
1 parent e8f19c6 commit 18fe284

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
> Lecturer: Dr Ian McLoughlin
55
> [Original Problem Sheet](https://github.com/emerging-technologies/emerging-technologies.github.io/blob/master/problems/python-fundamentals.md)
66
7-
*Need to add some error handling.*
8-
97
## Goals
108

119
The aim of these problems is to give you a good knowledge of basic Python. The problems are good for either learning Python from scratch or refreshing your memory of the language. They cover a variety of variable types, calculations, loops, user input, and in-built functions, among other things.
1210

11+
### Getting Set Up
12+
I'm using Python 3.6 (download [here](https://www.python.org/downloads/)),which is slightly different to Python 2.7. For example, Python 2.7 doesn't require parentheses in `print` statements, whereas 3.6 does - keep this in mind when running these programs. [Anaconda](https://www.anaconda.com/download/) is great for managing packages and libraries used in Python, so I'd recommend downloading that.
13+
Once you have Python set up, open command line and `cd` to wherever you want to save the repository, type `git clone https://github.com/rebeccabernie/PythonFundamentals.git` and finally, `cd PythonFundamentals`. To run any program, type `python programname.py`.
14+
*If you're getting errors when trying to run a program, you may need to [add python to your path variable](https://docs.python.org/3.3/using/windows.html#configuring-python).*
15+
1316
## Exercises
1417

1518
**1. Hello World**
@@ -70,7 +73,7 @@ The user enters a word (or sentence), and the program tests whether the string i
7073
The user enters two lists containing three numbers each. The program merges the two lists into one, and sorts the new list from lowest to highest.
7174

7275
**9. Newton's Square Root Method**
73-
The user enters a number and their guess for the square root of that number. The program uses Newton's method to calculate the square root using the user's guess (z), the original number(x), and the new approximate(the equation result from the last iteration of the loop):
76+
The user enters a number and their guess for the square root of that number. The user can't enter any negative number for x () The program uses Newton's method to calculate the square root using the user's guess (z), the original number(x), and the new approximate(the equation result from the last iteration of the loop):
7477

7578
```
7679
newApproximate = z - ((z* - x) / (2 * z))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /