forked from ronreiter/interactive-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex-python.html
More file actions
148 lines (125 loc) · 6.75 KB
/
index-python.html
File metadata and controls
148 lines (125 loc) · 6.75 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
{% extends "base.html" %}
{% block page_title %}{{ html_title }}{% endblock %}
{% block head %}
{% autoescape off %}
<script>
var domainData = {{ domain_data_json }};
var nextChapter = "/{{ language_code }}/{{ next_chapter }}";
var previousChapter = "/{{ language_code }}/{{ previous_chapter }}";
var backChapter = "/{{ language_code }}/{{ back_chapter }}";
var tutorialData = {{ tutorial_data_json }};
</script>
{% endautoescape %}
<script src="/static/js/learnpython.js"></script>
{% endblock %}
{% block title %}{% if tutorial_page %}{{ page_title }} - {% endif %}Learn {{ domain_data.language_uppercase }} - Free Interactive {{ domain_data.language_uppercase }} Tutorial{% endblock %}
{% block ogtitle %}{% if tutorial_page %}{{ page_title }} - {% endif %}Learn {{ domain_data.language_uppercase }} - Free Interactive {{ domain_data.language_uppercase }} Tutorial{% endblock %}
{% block ogurl %}{{ domain_data.full_url }}{% if tutorial_page %}/{{ path }}{% endif %}{% endblock %}
{% block content %}
<div class="container" id="main">
<div class="row">
<div class="col">
{% if page_title %}
<ul class="breadcrumb" style="margin-top: 10px">
{% if back_chapter %}
<li><a href="/{{ language_code }}/{{ back_chapter }}">{{ back_chapter }}</a> <span class="divider mr-1">/</span></li>
{% endif %}
<li class="active">{{ page_title }}</li>
</ul>
{% endif %}
<div class="clearfix">
<p>Get started learning Python with <a href="https://datacamp.pxf.io/c/67577/1012793/13294?sharedId=learnpython.org">DataCamp's</a> free <a href="https://datacamp.pxf.io/c/67577/1012793/13294?sharedId=learnpython.org">Intro to Python tutorial</a>. Learn Data Science by completing interactive coding challenges and watching videos by expert instructors. <a href="https://datacamp.pxf.io/c/67577/1012793/13294?sharedId=learnpython.org">Start Now</a>!</p>
<p>Ready to take the test? Head onto <a href="https://www.learnx.org" target="_blank">LearnX</a> and get your Python Certification!</p>
</div>
<div id="inner-text">{% autoescape off %}
{% if page_title %}
<h1>{{ page_title }}</h1>
<hr/>
{% endif %}
{{ text }}
{% endautoescape %}</div>
<!-- DataCamp-Light exercise -->
{% if page_title %}
<div data-datacamp-exercise data-lang="python" data-height="400">
<code data-type="pre-exercise-code"></code>
<code data-type="sample-code">{{tutorial_data.code}}</code>
<code data-type="solution">{{tutorial_data.solution}}</code>
<code data-type="sct">{{tutorial_data.output}}</code>
</div>
{% endif %}
<div>
<p>This site is generously supported by <a href="https://datacamp.pxf.io/c/67577/1012793/13294?sharedId=learnpython.org">DataCamp</a>. DataCamp offers online interactive <a href="https://datacamp.pxf.io/c/67577/1012793/13294?sharedId=learnpython.org">Python Tutorials</a> for Data Science. Join <b>over a million</b> other learners and get started learning Python for data science today!</p>
<p>Ready to take the test? Head onto <a href="https://www.learnx.org" target="_blank">LearnX</a> and get your Python Certification!</p>
{% if previous_chapter %}
<a class="btn btn-primary pull-left" href="/{{ language_code }}/{{ previous_chapter }}">
<i class="fas fa-angle-double-left"></i> Previous Tutorial
</a>
{% endif %}
{% if next_chapter %}
<a class="btn btn-primary pull-right" href="/{{ language_code }}/{{ next_chapter }}">
Next Tutorial <i class="fas fa-angle-double-right"></i>
</a>
{% endif %}
<a class="btn btn-secondary pull-right mr-2" href="https://www.learnx.org">
Take the Test <i class="fas fa-angle-double-right"></i>
</a>
</div>
<div class="hidden-phone">
{% if domain_data.courses %}
<h3>Online Courses</h3>
<div class="row">
{% for course in domain_data.courses %}
<div class="course col-2">
<a href="{{ course.link }}">
<img src="{{ course.image_url }}">
<p style="font-weight: bold; margin-top: 10px; font-size: 14px">{{ course.link_name }}</p>
{# <div>Retail Price: ${{ course.retail_price }}</div>#}
{# <div style="text-size: 12px">{{ course.advertiser }}</div>#}
</a>
<img src="{{ course.pixel_url }}" width="1" height="1" border="0"/>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
<div class="col-2 d-none d-lg-block mt-2">
<div id="google-ad-right">
<iframe src="https://learnpython-ads.datacamp.com/?page={{page_title}}&language={{language_code}}" frameborder="0" width="160" height="600" scrolling="no" allowtransparancy="true" style="margin-bottom: 10px; border: 0;"></iframe>
<style>
.ab-test a {
display: none;
}
</style>
<script>
function handleOutboundLinkClicks(event) {
ga('send', 'event', {
eventCategory: 'Outbound Link',
eventAction: 'click',
eventLabel: event.href
});
setTimeout(() => document.location = event.href, 500)
return false;
}
</script>
<h4>Sponsors</h4>
<div style="margin-top: 20px">
<a href="https://digitalocean.com/" onclick="return handleOutboundLinkClicks(this)">
<img src="/static/img/banners/digital-ocean.svg" style="width: 160px" alt="Digital Ocean">
</a>
</div>
<h4 class="mt-3">Chapters</h4>
<hr/>
<div class="mt-2">
{% for link, link_href in site_tutorial_links %}
<div>
<a href="{{ link_href }}">{{ link }}</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% include "footer.html" %}
{% endblock %}