




























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 comprehensive set of questions and detailed answers related to scripting and programming foundations. It covers object-oriented language concepts, markup languages like html, the role of libraries, and fundamental programming elements such as variables, data types, operators, and control structures. The material also delves into more advanced topics like algorithm analysis, uml design, and different programming paradigms, making it a valuable resource for exam preparation and understanding core programming principles. It also includes a comparison of compiled and interpreted languages, and examples of languages like c, java, and ruby.
Typology: Exams
1 / 36
This page cannot be seen from the preview
Don't miss anything!





























Object-oriented language .......Answer.........Supports decomposing a program into objects. C++, Java, Python, and C# provide extensive object-oriented support. In fact, the ++ in C++ suggests C++ is better than C, due in large part to supporting objects. C does not. MATLAB and Javascript provide some support. Markup language .......Answer.........Allows a developer to describe a document's content, desired formatting, or other features. A popular markup language is HTML. HTML allows a developer to describe the text, links, images, and other features
of a web page. While some people refer to "HTML programming", a markup language is not executed statement- by-statement like a programming language, and an HTML file is not a program. Rather, a web browser reads an HTML file and renders the corresponding web page. An HTML file surround text by different tags to yield different formatting. Library .......Answer.........A set of pre-written functions (and other terms) that carry out common tasks that a programmer can use to improve productivity. After including a library with a program, a programmer can make use of the library's functions. A library's functions typically all relate to the same purpose, like computing statistics, or like displaying graphics. A programmer may include several libraries in a single program.
Variable .......Answer.........A name that refers to a value String .......Answer.........Text surrounded by quotes Integer .......Answer.........A number Boolean .......Answer.........A true or false value Programming grammar .......Answer.........Language rules, returns a syntax error if not followed Change variable value .......Answer.........Using an = assigns a new value Indexing a string .......Answer.........Selecting a sub-sequence of a string Slicing a string .......Answer.........Obtaining a subset of data from a string
if
else:
Compound mathematical expressions .......Answer.........1st - parenthesis 2nd - multiplication and division from left to right 3rd - addition and subtraction from left to right Parenthesis .......Answer.........Groups items in an expression Defines inputs in procedures <
** .......Answer.........Less than Greater than Less than or equal to Greater than or equal to Equal to Not equal to
colors = ["red" , "yellow" , "blue"] print colors[0:2] Pop method .......Answer.........Removes the last element from a list by default, or a specific element using an index Updating a list .......Answer.........Lists can be updated using a mutation with a index Locating a value in multiple lists .......Answer.........Use index to first select the sub-list, then the value in that list print Colors [0] [1]
Append operator .......Answer.........Mutates list by adding elements to the end of the list Object .......Answer.........Something that has its own identity, attributes, and behavior Class .......Answer.........Describes what an object will be, one class can have many objects A house is an object, the blueprints to the house are a class Dot notation .......Answer..........
For example the + sign It will add integers, but concatenate strings Linear Search vs Hashed Search .......Answer.........Linear searches everything, hashed searches an index Buckets .......Answer.........Buckets group entries together in a hash table, allowing the entries to be quickly found Algorithm .......Answer.........Well defined sequence of steps that MUST produce results when done, if results aren't produced than it is a PROCEDURE instead Circular definitions .......Answer.........Definition without a base that constantly calls itself, putting itself in a loop, very useful for mathematical application Fastest access to data .......Answer.........Hash table or dictionary
Recursive definition .......Answer.........Solution of the problem relies on the solution to smaller instances of the problem Used to define many things using simple rules Must have a base case that allows it to end, must move towards this end, and must call itself recursively Algorithm cost .......Answer.........Resources required to execute, time and memory Algorithm analyzation prioritization .......Answer.........Worst case to best case
Use case title .......Answer.........Short phrase that describes the goal Use case actor .......Answer.........Person or entity who needs to accomplish something, must exists outside the system Use case scenario .......Answer.........How the user accomplishes the activity or goal Class diagram .......Answer.........Visual representation of the needs of classes, allowing you to plan out creation of classes Programming library .......Answer.........Code already written, tested, and ready to use Compiled programming language .......Answer.........Source code turned into executable machine code, machine code is then un- editable
Interpreted programming language .......Answer.........Language that does the conversion from source to machine code on the fly, is executed when needed with no separate executable file, and it always editable Object oriented programming language .......Answer.........Language based around objects rather than actions C .......Answer.........games utilities embedded systems operating systems Java .......Answer.........cross-platform language
Output .......Answer.........A programs puts that data somewhere, such as to a file, screen, network, etc. Computational thinking .......Answer.........Creating a sequence of instructions to solve a problem. Algorithm .......Answer.........A sequence of instructions that solves a problem. Statement .......Answer.........Carries out some action and executing one at a time. String literal .......Answer.........Consists of text (characters) within double quotes, as in "Go #57!". Cursor .......Answer.........Indicates where the next output item will be placed in the output.
Newline .......Answer.........A special two-character sequence \n whose appearance in an output string literal causes the cursor to move to the next output line. The newline exists invisibly in the output. Comment .......Answer.........Text added to a program, read by humans to understand the code, but ignored by the program when executed. Whitespace .......Answer.........Refers to blank spaces (space and tab characters) between items within a statement, and to newlines. Whitespace helps improve readability for humans, but for execution purposes is mostly ignored. Pseudocode .......Answer.........Text that resembles a program in a real programming language but is simplified to aid human understanding.