-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
54 lines (35 loc) · 1.27 KB
/
notes.txt
File metadata and controls
54 lines (35 loc) · 1.27 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
https://www.npmjs.com/package/python-shell
https://www.npmjs.com/package/random-words
------Valid strings you can send in------
testString =
'\narr = [1,2,3,4,5]' +
'\nfor x in arr:' +
'\n\tprint(x + 3)'
------Get print statements------
- use 2nd param, results, in the callback
------Get all variables------
COMPLETE
------Get line number------
import inspect
def line_numb():
'''Returns the current line number in our program'''
return inspect.currentframe().f_back.f_lineno
x = [1, 2, 3, 4, 5] ; print(f'I am at line {line_numb()}')
------Where to put line numbers------
- If at a function or loop (ends with colon), add it after that function/loop
- If NOT at a function or loop, add a semicolon and that print statement
------Function Return Values------
- Create some hidden/private variable before the return, to signify the "return variable"
------Notes------
- A step of zero will cause an error
------Future------
1) generateRandomNumbers => generateRandomNumber
2) inside "slice" do all problems in one Python shell (speed)
kill servers on 3000:
killall -9 node
Concurrently must be a devDependency
Future:
Idea #1:
Have slicing problems, primitive problems, and other similar problems funnel into ONE component
Idea #2:
Have options to toggle the RNG of the problems