forked from devinitpy/devinitpy.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
111 lines (110 loc) · 5.36 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Py Course</title>
<meta name="generator" content="Bootply" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="css/styles.css" rel="stylesheet">
</head>
<body>
<!-- header -->
<div id="top-nav" class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Course Outline</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
</li>
</ul>
</div>
</div>
<!-- /container -->
</div>
<!-- /Header -->
<!-- Main -->
<div class="container-fluid">
<div class="row">
<div class="col-sm-3">
<!-- Left column -->
<hr>
<ul class="nav nav-stacked">
<ul class="nav nav-stacked collapse in" id="userMenu">
<li class="active"><a href="#"><h3>Week 1</h3></a></li>
<!-- <li><a href="#"><i class="glyphicon glyphicon-cog"></i>Week 2</a></li>
<li><a href="#"><i class="glyphicon glyphicon-cog"></i>Week 3</a></li>
<li><a href="#"><i class="glyphicon glyphicon-cog"></i>Week 4</a></li> -->
</ul>
</li>
</ul>
</div>
<!-- /col-3 -->
<div class="col-sm-9">
<h3>Programming With Python </h3>
<article>
<h3>Intro to python</h3>
<p> We learnt that python is a programming language, a set of rules we use to communicate
with the computer to carry out our instructions</p>
<h3>Setting Environment Variables</h3>
<p> In order to run python programs our computer has to know about python or rather know where python is located.
This is termed as setting computer environment Variables</p>
<p> Computer variables are set differently depending on your computer operating system. For windows
one sets them from my computer's advanced system property wndow</p>
<h3>Running python programs</h3>
<p>After saving out your python program as .py you can run it from the command line after going to the directory it is contained</p>
<p>One opens the command line and then use's cd command to go to the directory where his or her program
is located eg cd Documents/python_tutorials and then runs the program for example program hello.py will be run as python hellp.py</p>
<p>One can as well run their python programs from sublime. Go to the Tools menu and then sublimeRepl then python then python run current file</p>
<h3>In built python function</h3>
<p>Python has inbuilt function that are always available for use without having to use the import statement to import them,
for example print(),input() etc You can find others at <a href="https://docs.python.org/2/library/functions.html">Python.org</a></p>
<h4>Tips </h4>
<p>For getting numerical input use input() </p>
<pre><i> age = input()<i></pre>
<p>For getting text input use raw_input() </p>
<pre><i> myName =raw_input()<i></pre>
</article>
</div>
<!--/col-span-9-->
</div>
</div>
<!-- /Main -->
<footer class="text-center ""><a href="http://www.bootply.com/85850"><strong>Python 101</strong></a></footer>
<div class="modal" id="addWidgetModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Add Widget</h4>
</div>
<div class="modal-body">
<p>Add a widget stuff here..</p>
</div>
<div class="modal-footer">
<a href="#" data-dismiss="modal" class="btn">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dalog -->
</div>
<!-- /.modal -->
<!-- script references -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/scripts.js"></script>
</body>
</html>