-
Notifications
You must be signed in to change notification settings - Fork 0
/
PythonTutörial1.html
176 lines (144 loc) · 7 KB
/
PythonTutörial1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<nav class="navbar">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Konglobemeralt</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="index.html">Home</a></li>
<li><a href="PythonTutorial1.html">Tutorials</a></li>
<li><a href="blogg.html">Blogg</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container-fluid text-center">
<div class="jumbotron">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h1>Crash Course in Python 2.7</h1>
<p class="lead">
Tutorial 1: Installation och variabler
</p>
</div>
</div>
</div>
</div>
<div class="container">
<!-- / <p>Cool animerad version:</p>
<div class="fakeMenu container">
<div class="fakeButtons fakeClose"></div>
<div class="fakeButtons fakeMinimize"></div>
<div class="fakeButtons fakeZoom"></div>
</div>
<div class="fakeScreen container">
<p class="terminalP blackLine1">>>> Fake python terminal skapad med CSS som nog kommer se både bättre ut än de statiska bilderna<span class="terminalSpan cursor1">_</span></p>
<p class="terminalP blackLine2" >samt gå att animera lite!<span class="terminalSpan cursor2">_</span></p>
<p class="terminalP redLine3">SyntaxError: invalid syntax</p>
<p class="terminalP blackLine4"> >>> <span class="terminalSpan cursor4">_</span></p>
</div>
-->
<p>För ett .</p>
<h1><strong>Installing python</strong></h1>
<p>First of all, we will need to install python which you can do by clicking <a href="https://www.python.org/downloads/">here</a> and following the instructions. I reccomend you pick version 2.7.12, but you should be able to follow this tutorial regardless of
which version you choose.</p>
<p>After following all the steps you should be able to find a program called "IDLE" in your start menu or launchpad if you are on a mac, which when started should display something like this:</p>
<div class="fakeMenu container">
<div class="fakeButtons fakeClose"></div>
<div class="fakeButtons fakeMinimize"></div>
<div class="fakeButtons fakeZoom"></div>
</div>
<div class="fakeScreen container">
<p class="blackP">Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32<br>
Type "copyright", "credits" or "license()" for more information.<br>
</p>
<p class="terminalP blackLine1">>>><span class="terminalSpan cursorInfinite">_</span></p>
</div>
<p>You are now ready to start telling the computer to do things by giving it instructions! Try entering "5+5" into the terminal window and then press enter. Whatch what happens. Try this out with other numbers and other operators and see what happens.
You can even use parentheses to build as complex expressions as you can imagine. After testing some stuff your window might look like this: </p>
<div class="fakeMenu container">
<div class="fakeButtons fakeClose"></div>
<div class="fakeButtons fakeMinimize"></div>
<div class="fakeButtons fakeZoom"></div>
</div>
<div class="fakeScreen container">
<p class="blackP">Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32<br>
Type "copyright", "credits" or "license()" for more information.<br>
</p>
<p class="blackP">>>>5+5<br>
</p>
<p class="blueP"> 10
</p>
<p class="blackP">>>>14/3<br>
</p>
<p class="blueP"> 4.666666666666667
</p>
<p class="blackP">>>>3 * 4<br>
</p>
<p class="blueP"> 12
</p>
<p class="blackP">>>>(23 / 4) * (91 + (90 / 10))<br>
</p>
<p class="blueP"> 570.0
</p>
<p class="terminalP blackLine1">>>><span class="terminalSpan cursorInfinite">_</span></p>
</div>
</div>
<div class="container-fluid site-footer">
<div class="row">
<div class="col-md-12">
<p>
<span class="glyphicon glyphicon-phone" aria-hidden="true"></span> 0701773030
</p>
<p>
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> [email protected]
</p>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
<script src="js/bootstrap.min.js"></script>
<script src="bower_components/isotope/dist/isotope.pkgd.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='https://www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X','auto');ga('send','pageview');
</script>
</body>
</html>