Professional Documents
Culture Documents
Quiz:Why Program?
Quiz:Why Program?
Answer: The computer did not understand the statement that you entered
//Another way to think about this is that you make typing mistakes for that
reason the interpreter cannot execute the code.
>>> x = 15
>>> x = x + 5
>>> print(x)
Answer: 20
// Now will see the computation step by step:
1: Initialize the variable "x" with the valor of 15 (x = 15)
2: Remember that writing code is not the same as in algebra.
We know that x is equal to 15, so x = x + 5
If we repeat the procedure x = x + 5, it will be equal
to x = 20 + 5 and x gonna be 25is the same that write x = 15 + 5.
Answer: .py
// This is a tricky question because
Answer: while
//This is something to watch out for, every kind of file has is dot
termination like: .py .c .js .mp3, etc.
And some of them are files you can execute like a photo or video like .jpg
or .mov (there are many more formats)
a program to install on your computer (.exe).
But for now, we are interested in the scripts for our IDE o Code Writer,
these are scripts like Python (.py)
JavaScript (.js), C++ (.cpp) that contain the code that we maniulate.
Answer: quit()
// In a Unix system terminal like Linux or Mac, you can close the terminal
with the "exit" command,
and is kind of common to see this command in interpreters and compilers.
But obviusly, python is diferent.
Secondary memory will be the long-time memory, that memoirs that you need
to take a time to find inside your brain.
Is represented un Hard-Drives, USB, Solid Stated Disk, etc.
10 - What is the best way to think about a "Syntax Error" while programming?
Answer: The computer did not understand the statement that you entered
/Repetition of question 1.