t170815518 / cz1003introduction_to_computationalthinking Goto Github PK
View Code? Open in Web Editor NEWThis repository includes codes for lab sessions and discussion questions of CZ1003@NTU.
License: MIT License
This repository includes codes for lab sessions and discussion questions of CZ1003@NTU.
License: MIT License
definition breaking down the complex problem into smaller manageable parts.
*Note: every subsolution needs to be synthesized to form the final solution *
definition the function calls itself
function body: base case(conquer), recursive step(divide)
*But recursion may not be efficient
Recursion: base case+recursive rules
Binary trees expression: e.g. [[left child], node, []]
answerList = random.sample([1,2,3,4,5,6,7,8,9,0], 4)
choose 4 unique elements from the sample list [read more]
Integer is not iteratable
Three steps
sum(board,[])
reduce the dimension of the list board
para = para[:]```
But the case above, para is new copy of the original list
# Discussion
```python
while data['score'] != -1:
...
Main Programme should only show the top-level flow
Decomposition means focus.
keyerror is common
any python files can be references as a module
module name is the filename without '.py'
when we import the module, the main program will be executed.
in modules, the main program is necessary for the unit test within the module
if __name__='__main__':
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.