-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasics in python.html
More file actions
104 lines (83 loc) · 4.4 KB
/
basics in python.html
File metadata and controls
104 lines (83 loc) · 4.4 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Basics in Python</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<style>
.fakeimg {
height: 200px;
background: #aaa;
}
</style>
</head>
<body>
<div class="jumbotron text-center" style="margin-bottom:0">
<h1>PyWORLD</h1>
</div>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">PyWORLD</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li ><a href="index.html">Home</a></li>
<li class="active"><a href="basics in python.html">Basics in python</a></li>
<li><a href="loops.html">Loops</a></li>
<li><a href="control structures.html">Control structures</a></li>
<li><a href="datatypes.html">Datatypes</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-sm-4">
<h3>Some topics in Basics of Python</h3>
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="basics in python.html">syntax in python</a></li>
<li><a href="input and output.html">Input and Output</a></li>
<li><a href="basic operators.html">Basic Operators </a></li>
</ul>
<hr class="hidden-sm hidden-md hidden-lg">
</div>
<div class="col-sm-8">
<h2>Syntax in Python</h2>
<div class="fakeimg">
<img src="img\Syntax.jpg" width="100%" height="200" >
</div>
<b>Python Line Structure:</b>
<p> A Python program is divided into a number of logical lines and every logical line is terminated by the token NEWLINE. A logical line is created from one or more physical lines.
A line contains only spaces, tabs, formfeeds possibly a comment, is known as a blank line, and Python interpreter ignores it.
A physical line is a sequence of characters terminated by an end-of-line sequence (in windows it is called CR LF or return followed by a linefeed and in Unix, it is called LF or linefeed). See the following example.</p>
<br>
<iframe src="https://trinket.io/embed/python3/db282f8efd" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
<b>Commenting</b>
<p>A comment begins with a hash character(#) which is not a part of the string literal and ends at the end of the physical line. All characters after the # character up to the end of the line are part of the comment and the Python interpreter ignores them. See the following example. It should be noted that Python has no multi-lines or block comments facility.</p>
<iframe src="https://trinket.io/embed/python3/1ff11e2c5b" width="100%" height="200" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
<b>Multiple statements in single line</b>
<p>You can write two separate statements into a single line using a semicolon (;) character between two line.</p>
<iframe src="https://trinket.io/embed/python3/c95992d284" width="100%" height="250" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
<b>Recommended video</b><br><br>
<iframe width="560" height="300" src="https://www.youtube.com/embed/YFmm6e5HHeM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="jumbotron text-center" style="margin-bottom:0">
<h3>PyWORLD</h3>
<font align="left">Banashankari 3rd stage,</font><br>
<font align="left">Banashankari,</font><br>
<font align="left">Bangalore 560 085.</font><br>
<font align="left">Contact us at +91 7981451469.</font>
</div>
</body>
</html>