We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 705df3d commit 6507d1fCopy full SHA for 6507d1f
2 files changed
modularity/createRunImport.py
@@ -0,0 +1,15 @@
1
+from urllib.request import urlopen
2
+
3
+def words():
4
+ with urlopen('http://bothellrobotics.com/programs') as programs:
5
+ program_words = []
6
+ for line in programs:
7
+ line_words = line.decode('utf-8').split()
8
+ for word in line_words:
9
+ program_words.append(word)
10
11
+ for word in program_words:
12
+ print(word)
13
14
+if(__name__ == '__main__'):
15
+ words()
modularity/functionsExample.py
@@ -0,0 +1,11 @@
+def square(x):
+ return x * x
+def launch_missiles():
+ print('missiles launched')
+def even_or_odd(n):
+ if n % 2 == 0:
+ print('even')
+ return
+ print('odd')
0 commit comments