Skip to content

Commit 7d7a553

Browse files
Chris R. AlbonChris R. Albon
authored andcommitted
Still revamping the last set of snippits.
1 parent 0b62bbc commit 7d7a553

39 files changed

+1766
-42
lines changed

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/code_py.iml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/scopes/scope_settings.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 447 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python3.sublime-build.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# To make Python3 work with sublimetext
2-
3-
# 1. Go to tools/build system/build new system
4-
5-
# 2. Paste in this (if you have Anaconda installed)
61

72
{
83
"cmd": ["/Users/chrisralbon/anaconda/envs/python3/bin/python3", "-u", "$file"],

arithmatic.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Basic Arithmatic
2+
3+
# Create some simulated variables
4+
x = 6
5+
y = 9
6+
7+
# x plus y
8+
print(x + y)
9+
10+
# x minus y
11+
print(x - y)
12+
13+
# x times y
14+
print(x * y)
15+
16+
# the remainder of x divided by y
17+
print(x % y)
18+
19+
# x divided by y
20+
print(x / y)
21+
22+
# x divided by y (floor) (i.e. the quotient)
23+
print(x // y)
24+
25+
# x raised to the y power
26+
print(x ** y)
27+
28+
# x plus y, then divide by x
29+
print((x + y) / x)
30+
31+
# Classics vs. floor division. This varies between 2.x and 3.x.
32+
33+
# Classic divison of 3 by 5
34+
print(3 / 5)
35+
36+
# Floor divison of 3 by 5. This means it truncates any remainder down the its "floor"
37+
print(3 // 5)

0 commit comments

Comments
 (0)