mirror of
https://github.com/ossu/computer-science.git
synced 2024-10-01 01:26:01 -04:00
some 'check yourself' questions 01.01.02
This commit is contained in:
parent
642f3ef491
commit
fa6a77b3ad
@ -13,3 +13,13 @@ This lecture covers the building blocks of straight line and branching programs:
|
|||||||
◈ [Code in Node.JS](https://github.com/ericdouglas/MIT-computer-science-and-engineering/blob/master/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.js)
|
◈ [Code in Node.JS](https://github.com/ericdouglas/MIT-computer-science-and-engineering/blob/master/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.js)
|
||||||
|
|
||||||
◈ [Code in Python](https://github.com/ericdouglas/MIT-computer-science-and-engineering/blob/master/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.py)
|
◈ [Code in Python](https://github.com/ericdouglas/MIT-computer-science-and-engineering/blob/master/archives/01-introduction-to-computer-science-and-programming/archives/UNIT-01/02-core-elements-of-a-program/example.py)
|
||||||
|
|
||||||
|
## Check Yourself
|
||||||
|
|
||||||
|
### What is a *type*?
|
||||||
|
|
||||||
|
Type are classifications of objects, which is what Python, as an OOP language, deals with. They determine how those objects are dealt with (for example, adding two integers results in an integer, two strings results in a concatenated string, and on integer and a string results in an error).
|
||||||
|
|
||||||
|
### What is an 'expression'?
|
||||||
|
|
||||||
|
An expression is composed of objects (or operands) and operators, and can be interpreted into a value.
|
||||||
|
Loading…
Reference in New Issue
Block a user