


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A basic introduction to programming with python, covering fundamental concepts like machine language, instruction lists, natural languages, alphabets, lexis, syntax, semantics, compilation, and interpretation. It includes questions and answers related to these concepts, offering a starting point for understanding the basics of programming in python.
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Machine Language - Answer: Computers have their own language too, which is very rudimentary. Instruction List (IL) - Answer: A complete set of known commands is called an Natural Languages - Answer: they are still evolving, and new words are created every day as old words disappear. These languages are called Alphabet - Answer: a set of symbols used to build words of a certain language Lexis - Answer: (aka a dictionary) a set of words the language offers its users (e.g., the word "computer" comes from the English language dictionary, while "cmoptrue" doesn't; the word "chat" is present both in English and French dictionaries, but their meanings are different) Syntax - Answer: a set of rules (formal or informal, written or felt intuitively) used to determine if a certain string of words forms a valid sentence (e.g., "I am a python" is a syntactically correct phrase, while "I a python am" isn't) Semantics - Answer: a set of rules determining if a certain phrase makes sense (e.g., "I ate a doughnut" makes sense, but "A doughnut ate me" doesn't) The IL - Answer: the alphabet of a machine language. This is the simplest and most primary set of symbols we can use to give commands to a computer. It's the computer's mother tongue. Source Code - Answer: A program written in a high-level programming language Source Files - Answer: the file containing the source code is
Alphabetically - Answer: a program needs to be written in a recognizable script, such as Roman, Cyrillic, etc. Lexically - Answer: each programming language has its dictionary and you need to master it; thankfully, it's much simpler and smaller than the dictionary of any natural language; Syntactically - Answer: each language has its rules and they must be obeyed; Semantically - Answer: the program has to make sense. Compilation - Answer: the source program is translated once (however, this act must be repeated each time you modify the source code) by getting a file (e.g., an .exe file if the code is intended to be run under MS Windows) containing the machine code; now you can distribute the file worldwide; the program that performs this translation is called a compiler or translator; Interpretation - Answer: you (or any user of the code) can translate the source program each time it has to be run; the program performing this kind of transformation is called an interpreter, as it interprets the code every time it is intended to be executed; it also means that you cannot just distribute the source code as-is, because the end-user also needs the interpreter to execute it. Computer File - Answer: Let's assume once more that you have written a program. Now, it exists as a Text Files - Answer: a computer program is actually a piece of text, so the source code is usually placed in Pure Text - Answer: without any decorations like different fonts, colors, embedded images or other media Error Message - Answer: If the compiler finds an error, it finishes its work immediately. The only result in this case is an Compilation Advantages - Answer: - the execution of the translated code is usually faster;
all the newer versions of Python 3 are - Answer: backward compatible with the previous versions of Python 3.