import micropip
await micropip.install('numpy')
import numpy as np
a = np.random.rand(3,2)
b = np.random.rand(2,5)
print(a@b)
- oop
- BASIC:
- instantiation of object and use of object to use method
- initialised to zero dont need to include in parameter list within()
- declare as array/list
- append list
- pseudocode declaration of data type
- inheritance
- override parent's method
- overload
- containment
- BASIC:
- range
- inclusive
- exclusive
- for _ in range()
- file
- f=open('filename.txt', 'r')
- with open('filename.txt', 'r') as f:
- f.read()
- f.readline()
- f.read().strip()
- f.write('write this string\n')
- \n to add new line
- f.close()
- import os
- if os.path.exists('filename.txt')
- adt:
- search:
- linear
- binary search
- sort:
- string manipulation
- print('blabla', end=' ')
- slicing
- miscellaneous important stuff
- after return, function stops
- thought input as class 'str' unless explicitly use int()
- input checking
Past years:
9618_41_mj_24
9618_41_mj_23
9618_42_mj_24