-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial.html
More file actions
296 lines (269 loc) · 13.3 KB
/
Copy pathtutorial.html
File metadata and controls
296 lines (269 loc) · 13.3 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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Tutorial</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="_static/pygments_dark.css?v=b20cc3f5" />
<link rel="stylesheet" type="text/css" href="_static/classic.css?v=67a6116b" />
<link rel="stylesheet" type="text/css" href="_static/pydoctheme.css?v=4eb63a40" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
<script src="_static/documentation_options.js?v=29a6c3e3"></script>
<script src="_static/doctools.js?v=fd6eb6e6"></script>
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=f281be69"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="What is UniversalPython" href="tutorial/chapter-1.html" />
<link rel="prev" title="UniversalPython documentation" href="index.html" /><link rel="stylesheet" href="_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
<link rel="shortcut icon" type="image/png" href="_static/logo.svg">
<script type="text/javascript" src="_static/copybutton.js"></script>
<script type="text/javascript" src="_static/menu.js"></script>
<script type="text/javascript" src="_static/search-focus.js"></script>
<script type="text/javascript" src="_static/themetoggle.js"></script>
</head>
<body>
<div class="mobile-nav">
<input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu">
<nav class="nav-content" role="navigation">
<label for="menuToggler" class="toggler__label">
<span></span>
</label>
<span class="nav-items-wrapper">
<a href="https://universalpython.github.io/playground/" class="nav-logo">
<img src="_static/logo.svg" alt="UniversalPython logo">
</a>
<span class="version_switcher_placeholder"></span>
<form role="search" class="search" action="search.html" method="get">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
<path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
</svg>
<input placeholder="Quick search" aria-label="Quick search" type="search" name="q">
<input type="submit" value="Go">
</form>
</span>
</nav>
<div class="menu-wrapper">
<nav class="menu" role="navigation" aria-label="main navigation">
<div class="language_switcher_placeholder"></div>
<label class="theme-selector-label">
Theme
<select class="theme-selector" oninput="activateTheme(this.value)">
<option value="auto" selected>Auto</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
</label>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">UniversalPython documentation</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="tutorial/chapter-1.html"
title="next chapter">What is UniversalPython</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/tutorial.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</nav>
</div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="tutorial/chapter-1.html" title="What is UniversalPython"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="UniversalPython documentation"
accesskey="P">previous</a> |</li>
<li><img src="_static/logo.svg" alt="UniversalPython logo" style="vertical-align: middle; margin-top: -1px; width: 16px; height: 16px;"></li>
<li><a href="https://universalpython.github.io/playground/">UniversalPython</a> »</li>
<li class="switchers">
<div class="language_switcher_placeholder"></div>
<div class="version_switcher_placeholder"></div>
</li>
<!-- <li>
<a href="index.html"></a> »
</li> -->
<li class="nav-item nav-item-this"><a href="">Tutorial</a></li>
<li class="right">
<div class="inline-search" role="search">
<form class="inline-search" action="search.html" method="get">
<input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">
<input type="submit" value="Go">
</form>
</div>
|
</li>
<li class="right">
<label class="theme-selector-label">
Theme
<select class="theme-selector" oninput="activateTheme(this.value)">
<option value="auto" selected>Auto</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
</label> |</li>
<li class="right">
<a href="https://github.com/universalpython/" title="GitHub" target="_blank" rel="noopener">GitHub</a> |
</li>
<li class="right">
<a href="https://pypi.org/project/universalpython/" title="PyPI" target="_blank" rel="noopener">PyPI</a> |
</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="tutorial">
<h1>Tutorial<a class="headerlink" href="#tutorial" title="Link to this heading">¶</a></h1>
<p>This tutorial introduces you to <strong>UniversalPython</strong>, a tool that helps learners write Python code using keywords and identifiers in their <strong>native human language</strong>.</p>
<p>UniversalPython is <strong>not a new language</strong>. It is a <strong>transpiler</strong>, a small layer that translates code written in other natural languages into standard Python. This allows students to begin learning Python concepts using familiar vocabulary.</p>
<p>All code written in UniversalPython is executed as <strong>real Python</strong>. You can use the full Python standard library and any third-party packages. The goal of UniversalPython is to <strong>lower the language barrier</strong>, not to replace or redefine Python.</p>
<p>This tutorial is written for:</p>
<ul class="simple">
<li><p>Learners who want to explore Python in their own language</p></li>
<li><p>Teachers who want to introduce programming without the barrier of English syntax</p></li>
</ul>
<p>To follow this tutorial, you will need:</p>
<ul class="simple">
<li><p>Python 3.4 or later</p></li>
<li><p>A Terminal or Jupyter Notebook</p></li>
<li><p>Optionally, access to the <a class="reference external" href="https://universalpython.github.io/playground/">Online Playground</a> for running code in the browser</p></li>
</ul>
<p>We recommend reading the tutorial chapters in order. However, if you are already familiar with Python and only want to understand UniversalPython’s features, you may skip ahead to the Using Your Native Language in Python chapter.</p>
<p><strong>Chapters:</strong></p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="tutorial/chapter-1.html">What is UniversalPython</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial/chapter-2.html">Using Your Native Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial/chapter-3.html">Your First Program</a></li>
</ul>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">UniversalPython documentation</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="tutorial/chapter-1.html"
title="next chapter">What is UniversalPython</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/tutorial.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="tutorial/chapter-1.html" title="What is UniversalPython"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="UniversalPython documentation"
>previous</a> |</li>
<li><img src="_static/logo.svg" alt="UniversalPython logo" style="vertical-align: middle; margin-top: -1px; width: 16px; height: 16px;"></li>
<li><a href="https://universalpython.github.io/playground/">UniversalPython</a> »</li>
<li class="switchers">
<div class="language_switcher_placeholder"></div>
<div class="version_switcher_placeholder"></div>
</li>
<!-- <li>
<a href="index.html"></a> »
</li> -->
<li class="nav-item nav-item-this"><a href="">Tutorial</a></li>
<li class="right">
<div class="inline-search" role="search">
<form class="inline-search" action="search.html" method="get">
<input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">
<input type="submit" value="Go">
</form>
</div>
|
</li>
<li class="right">
<label class="theme-selector-label">
Theme
<select class="theme-selector" oninput="activateTheme(this.value)">
<option value="auto" selected>Auto</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
</label> |</li>
<li class="right">
<a href="https://github.com/universalpython/" title="GitHub" target="_blank" rel="noopener">GitHub</a> |
</li>
<li class="right">
<a href="https://pypi.org/project/universalpython/" title="PyPI" target="_blank" rel="noopener">PyPI</a> |
</li>
</ul>
</div>
<div class="footer">
© Copyright 2025, Saad Bazaz.
<br>
This page is licensed under the UniversalPython team.
<br>
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
<br>
<br>
<!-- The Python Software Foundation is a non-profit corporation.
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br> -->
<br>
<br>
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 9.1.0.
</div>
</body>
</html>