Accounting | Business | Computer
Science | General
Studies | Math | Sciences | Civics Exam | Help/Support | Join/Cancel | Contact Us | Login/Log Out
Computer Programming: Midterm Exam 2 Exam 1 2 3 4 5 6 7 8 9 10 Midterm 1 2 Final Exam 1 2 Graded Program Assignment 1 2 3 4 5 6 7 8 9 Python Compiler The correct order of operator precedence, from highest to lowest, is: a.) addition, integer division, exponentiation, multiplication. b.) addition, exponentiation, integer division, multiplication. c.) exponentiation, integer division, multiplication, addition. d.) exponentiation, multiplication, integer division, addition. e.) exponentiation, multiplication, addition, integer division. What is the correct result of the equation: 2 * 2 ^ 3? a.) 1.33 b.) 8 c.) 12 d.) 64 e.) 16 What is the correct result of the equation: 2 + 3 * 4? a.) 5 b.) 10 c.) 12 d.) 14 e.) 20 The term MOD is used for: a.) exponentiation. b.) multiplication. c.) division. d.) integer division. e.) integer remainder. Which is not considered a form of output? a.) Using a printer b.) Saving to a floppy disk c.) Saving to a hard drive d.) Displaying on a screen e.) All of the above are examples of output How is a string literal created? a.) Using the ampersand symbol b.) Using an intrinsic function c.) Using single quotes d.) Using double quotes e.) All of the above. What is a predefined command that adds functionality to the programming language called? a.) Algorithm b.) Pseudocode c.) Variable d.) Intrinsic function e.) Watch window Which is not an example of an intrinsic function? a.) FormatCurrency b.) FormatPercent c.) FormatDollar d.) Round e.) Random A variable watch window will appear when: a.) the program is being created. b.) the program is running. c.) the program is paused. d.) Both b and c. e.) All of the above. a set of instructions that a computer follows to perform a task program the physical devices that a computer is made of are referred to as hardware the part of a computer that runs programs the CPU today, CPUs are small chips known as microprocessors where the computer stores a program while the program is running as well as the data that the program is working with main memory a volatile type of memory that is used only for temporary storage while a program is running secondary memory a type of memory that can hold data for long periods of time secondary storage a component that collects data from people or other devices and sends it to the computer (ex: keyboard, camera) input device enough memory to store a letter of the alphabet or a small number byte a byte is made up of eight ________ bits a hit that is turned off represents this value 0 a set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters ASCII an extensive encoding scheme that can represent that characters of many of the languages of the world unicode negative numbers are encoded using the ________ technique two's complement real numbers are encoded using the ________ technique floating-point the tiny dots of color that digital images are composed of pixels if you were to look at a machine language program, you would see ________ a stream of binary numbers Translates a high-level language program into a separate machine language program compiler Today, CPUs are huge devices made of electrical and mechanicalcomponents such as vacuum tubes and switches. (T/F) False Main memory is also known as RAM. (T/F) True Any piece of data that is stored in a computer's memory must be stored as a binary number. (T/F) True Images, like the ones you make with your digital camera, cannot be stored as binary numbers. (T/F) False Machine language is the only language that a CPU understands. (T/F) True Assembly language is considered a high-level language. (T/F) False An interpreter is a program that both translates and executes the instructions in a high-level language program. (T/F) True A syntax error does not prevent a program from being compiled and executed. (T/F) False Windows Vista, Linux, UNIX, and Mac OS X are all examples of applications software. (T/F) False Word processing programs, spreadsheet programs, email programs, Web browsers, and games are all examples of utility programs. False transmits information across device Databus all main processing power; brain of the computer CPU creates a virtual copy of all programs and downloads RAM stores memory forever hard drive does not permanently store info volatile number of bits in a byte 8 bits number of bits in a nyble 4 bits Binary representation: 11111111 256 Binary representation: 00011000 24 Binary representation: 01111111 127 Binary representation: 00000010 2 Binary representation: 0000100 4 Binary representation: 01000001 65 low level program assembly C++, JavaScript, Python are high-level programs middle-level program c object-oriented programming base templates; scalability value of each term (right to left) in binary 0, 2, 4, 8, 16, 32, 64, 128 data type tells program which type of data you're using list of data types string, integer, double, float, long, short, char The expression score[5] is pronounced _____________________. Score of sub 5 Which of the following array declarations would be best suited for storing the retail prices? Declare Real retailPrice[SIZE] What type of error occurs when a loop iterates one time too few or one time too many? Off-by-one error A list of operations that is displayed on the screen is called a(n) _______________. Menu The acronym GUI stands for _____________. Graphical user interface What is the structure that is needed to process a menu selection? Decision Which statement provides a Default section to validate the user's menu selection? Case A(n) _______ program always starts off by displaying a list of operations the user can select from. Menu-driven Which loop is a posttest loop such that the menu is displayed at least once? Do-while What type of menu first displays the main menu and then, based on the user's selection, displays a submenu? Multiple level menu Menu-driven programs should be broken down into ________ that perform individual tasks. Modules What is capable of performing several tasks and allows the user to select the task? Menu driven programs What is the method used to make sure that valid selections are processed? Input validation loop, Including the Default clause in the case structure, Use of an Else clause Errors common for noobs. Careless errors Common Errors What is a communication device in terms of computers? Hardware that allows the computer to communicate with other computers. What is the purpose of a compiler? Turns .java files to .class and executables What does CPU stand for? Central Processing Unit Which is the purpose of the Internal Clock? Synchronize internal operations via controlled electrical Impulses Unit of Measurement for Clock Speed Hz (or GHz) The purpose of CPU Retrieves Memory and Executes Purpose of Core Preforms Reading and Executing of Instructions How do computers translates characters into data the computer can work with? Encoding Scheme Why is RAM random? The data in the Unique address can be accessed in any order. Physical Differences between RAM and CPU RAM is less complicated, slower and cheaper Types of Storage Devises Magnetic Disk Drives, CDs and DVDs, USB flash drives USB Stands for Universal Serial Bus What assigns CPU space, memory and CPU time etc. for applications? Operating System What type of programming is centered on the procedures or actions that take place in a program? Procedural What type of programming encapsulates data and functions together in an object? Object oriented What software entity contains both data and procedures? Objects The variables, arrays, or other data structures that are stored in the object are known as the object's Fields The procedures that the object performs are known as ____________. Methods The programmer determines the fields and methods of an object and creates the ______ code. Class The class _________ starts with the word Class followed by the name of the class. Definition What is the term used for the fields and methods that belong to a class? Members The word Private that appears before a field declaration, in a class definition, is known as a(n) ____________. Access specifier The mutator methods are sometimes called _________________. Setters Which interface allows the user to interact with the operating system and other programs using graphical elements? Graphical User What type of interface displays a prompt, and the user types a command which is then executed? Command Line The __________ are small windows that display information and allow the user to perform actions. Dialog boxes What is the term used when a GUI program responds to the actions of the user? Event-driven The GUI components are known as _________________ and widgets. Controls GUI components have a set of _______________ that determine how the component appears on the screen. Properties What is the term used for the code that responds to events and allows a GUI program to respond to an event? Event handler What GUI component should be used if the user wants an area in which to type a single line of input from the keyboard? Text box A component's ______________ control the visual characteristics that are displayed on the component. Specifiers The items that appear in a program's graphical user interface are known as _______________. Shapes Processing a large number of items in a(n) ________ is usually easier than processing a large number of items stored in separate variables. Array What is the term used for the number inside the bracket that specifies the number of values that an array can hold? Size declarator Access the individual elements in an array by using their _____________. Subscripts In the following declaration, what is the data type of the elements of the array? Declare Integer numbers [SIZE] Integer Every element in an array is assigned a unique number known as a ______________. Subscript A flowchart represents the _______ design of a program. logical Pseudocode is one method for representing a(n) _______. algorithm _______ are the rules of a programming language. Syntax All _______ will input, process, and output data. information systems The input statement is represented by a(n) ___________. parallelogram The _______ statement is represented by a rectangle. assignment A(n) ___________ is used by the program as a store location for data. variable The ___________ is used to concatenate string literals and variables. ampersand Double quotes are used to indicate ___________ data. string ___________ data is entered as digits (sometimes with one decimal). Numeric Input statements are used to put ___________ into variables. data The name of a variable should ___________ the type of data being held by the variable. describe The name of a variable must start with a(n) ___________. letter The __________ statement processes data and stores the result in a variable. assignment The is found on the right-hand side of an assignment statement. expression The ___________ is found on the left-hand side of an assignment statement. Variable Using ___________ will override the operator precedence for mathematical operations. Parentheses The operation with the lowest order of precedence is __________________ _______________. addition/subtraction Text found inside of double quotation marks is called a(n) ____________ __________. string literal ___________ functions are commands packaged with the programming language, which provide helpful functionality such as math operations, conversion functions, file access, etc. Intrinsic Saving data to a hard drive is considered a(n) ___________ operation. Output The ampersand is used to ___________ string literals, variables, and expressions in output statements. Concatenate A bug is another name for a programming ___________. Error The _____ _______ option will execute the next command at the same level as the current command. Step Over Programmers say that one module can ___________ another, meaning that the first module causes the second module to execute. Call In most modern programming languages, a variable or constant that is declared in a module is ___________ in that module. In-scope Which of the following is not a term used as a synonym for module? Object The value 3 is a ___________. numeric constant Which of the following is valid advice for naming variables? To make names easier to read, separate long names by using underscores or capitalization for each new word. The value stored in an uninitialized variable is _________. Garbage Which of the following is not a typical housekeeping task? Printing summaries Which module in a typical program will execute the most times? The detail loop The assignment operator ___________. Is a binary operator the CPU determines which operation it should perform in the ________ part of the fetch-decode cycle decode computers can only execute programs that are written in ________ machine language translates an assembly language program to a machine language program assembler the words that make up a high-level programming language keywords the rules that must be followed when writing a program syntax Modularization _____. Facilitates re-usability A variable's data type describes all of the following except . The scope of the variable A hierarchy chart tells you ___________. Which modules call other modules A message that asks a user for input is a(n) ___________. Prompt What are nonexecuting statements that programmers place within code to explain program statements in English? Comments What does a declaration provide for a variable? A name and data type Every module has all of the following except___________ . Local variables What is the name for the process of paying attention to important properties while ignoring nonessential details? Abstraction The more that a module's statements contribute to the same job, the greater the___________ of the module. Functional cohesion Exam
1 2 3 4 5 6 7 8 9 10 Midterm 1
2 Final Exam 1
2
Graded Program Assignment 1 2 3 4 5 6 7 8 9 Python Compiler |
Home |
Accounting & Finance | Business |
Computer Science | General Studies | Math | Sciences |
Civics Exam |
Everything
Else |
Help & Support |
Join/Cancel |
Contact Us |
Login / Log Out |