Python: Difference between revisions
From wikiluntti
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Python introduction for pupils | Python introduction for pupils | ||
Understanding Deep Learning. Python notebooks covering the whole text | |||
https://udlbook.github.io/udlbook/ | |||
== Theory == | == Theory == | ||
Line 22: | Line 25: | ||
== Shorties == | == Shorties == | ||
=== Lists === | |||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
Line 30: | Line 35: | ||
print [[x, y] for x in xrange(3) for y in xrange(3)] | print [[x, y] for x in xrange(3) for y in xrange(3)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="python"> | |||
[list(x) for x in product(range(6), repeat=3)] | |||
</syntaxhighlight> | |||
=== NExt === | |||
=== NExt === | |||
=== NExt === | |||
=== NExt === | |||
=== NExt === | |||
=== NExt === |
Latest revision as of 20:58, 23 September 2024
Introduction
Python introduction for pupils
Understanding Deep Learning. Python notebooks covering the whole text https://udlbook.github.io/udlbook/
Theory
Animation; graph animation.
Blender animation; Change size of objects
Python oneliner to differentiate polynomial list
Plot Cansat or any csv data using Python
Shorties
Lists
print [[x, y] for x in range(3) for y in range(3)]
or
print [[x, y] for x in xrange(3) for y in xrange(3)]
[list(x) for x in product(range(6), repeat=3)]