AP Comp Sci Unit 3

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which block is least similar to the others?

arcLeft because it has to do with movement and you can see it when u call it but the other three u can't

High Level Programming Language

A language that is easy for humans to read

Which of the following are examples of abstraction? Select two

A programmer has code to find area of several triangles, one at a time. She decides to simplify her code by writing a procedure called "triangleArea," which takes the base and height of each triangle as a parameter. A logic gate is used to find the difference between two integers.

What is a function parameter?

A way to give input to a function that controls how the function runs.

Parameter

An extra piece of information passed to a function to customize it for a specific need (size)

API

Application Program Interface- a collection of commands made available to a programmer, A well-documented library of functions provided in a programming language that helps to simplify complex programming tasks.

To call/invoke

Calling a function to begin and defining the function occurs at the bottom

Low Level Programming Language

Language/ commands easy for the computer to understand (binary)

For Loop

Loops that have a predetermined beginning,END, and increment (step interval).

Machine Language

Lowest level programming language used by computers, only understood by computers

Programming Language

Programing system, a computer language engineered to create a standard form of commands

Which of the following statements are true about high-level programming languages? Select two answers.

A high-level programming language allows for code re-use. A high-level programming language often uses natural language elements(english).

Pair Programming

A method of programming in which two programmers write code using a single computer. One programmer in the "driver" role uses the mouse and keyboard to actually write the code while a second acts as a "navigator", keeping track of the big picture, catching errors, and making suggestions.

What are two aspects of efficiently?

answer: Execution time and memory usage or:Execution time and length of code

Which line of code should be removed to make the program work right?

line 7 because it is unnecessary and we already called those in the function definition of draw square.

Efficiency

means different things, the number of lines of code, the time or number of people they require to create

Iteration

repetition of part of an algorithm until a condition is met or for a specified number of times (looping)

Programming Environment

software suite that consolidates basic tools required to write and test software.

(pressing the gas pedal)

(HTTP and IP)

Hexadecimal

A base-16 number system that uses sixteen distinct symbols 0-9 and A-F to represent numbers from 0 to 15.

Function

A named group of programming instructions. Functions are reusable abstractions that reduce the complexity of writing and maintaining programs.

Elegant Code

It is efficient and to the point

Which of the following is a true statement about program documentation (comments)?

Program documentation is useful during initial program development and also when modifications are made to existing programs.

Library

a collection of commands / functions, typically with a shared purpose

Abstraction

a simplified representation of something more complex. Abstractions allow you to hide details to help you manage complexity and focus on relevant concepts

A team of student is collaborating on a program to obtain local weather data from a website and predict weather-related school closings based on their own formulas. They must present their code to a group of faculty, some who have little to no experience with code. What strategies can the group use while writing their code in order to make it more understandable for the faculty? Select two answers

Choose meaningful names for all variable and procedures. Use shorter blocks of code wherever possible.

Which of the following is NOT a true statement about functions?

Functions cannot make calls to other functions written by the same programmer.

Select the two true statements about functions with parameters:

Functions with parameters can be used to prevent the creation of duplicated code. Parameters help generalize the solution of a specific problem.

Loop

Repeat the commands, The action of doing something over and over again.

Documentation

a description of the behavior of a command, function, library, API, etc, comments

A program is expressed in a programming language. Which of the following is true of the program?

The program can also be expressed in binary, but will be more easily understood by humans when expressed in a higher-level programming language

Which of the following are benefits of using well-named variables in a computer program? Select two answers.

The program will be easier for people to read. The program will be easier to modify in the future.

Which block is least similar to the other? (moveTo, turnLeft, arcRight, moveForward)

TurnLeft because the other three are actually moving the turtle, turn left only changes its direction

Which of the following statements about writing functions and Top-Down Design is NOT true?

Two programmers solving the same problem using Top-Down Design should arrive at identical programs.

When choosing a programming language, which of the following will not be determined by the choice of language?

Whether or not a solution exists.

(for

while)

Which of the following statements are true about using a high-level programming language instead of a lower-level language? I. Programs written in a high-level language are generally easier for people to read than programs written in a low-level language. II. A high-level language provides programmers with more abstractions than a low-level language. III. Programs written in a high-level language are generally easier to debug than programs written in a low-level language.

I, II, and III

Which of the following is NOT a use of application programming interfaces (APIs)?

Justifying a program's correctness.

Top Down Design

Looking at the final product and breaking it down into smaller chunks that can be used to make it in the end, a problem solving approach (also known as stepwise design) in which you break down a system to gain insight into the sub-systems that make it up.

Choose the two (2) statements that are true about functions

Meaningful function names help people better understand programs. Functions in programming are named groupings of programming instructions

Boolean

a binary variable, having two possible values called "true" and "false."

Turtle Programming

a classic method for learning programming with commands to control movement and drawing of an on-screen robot called a "turtle", in the beginning it looked like a dome turtle

Algorithm

a precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages (recipe, directions)

A school has created a large community garden and the president of the student garden club wants to create a mobile application to guide guests through the garden. She is considering what language to use. What is the most important consideration when choosing the best language to use for writing the app?

answer:The student should use a language specifically developed for mobile applications, because it may have some built-in functions to make the language better-suited for expressing her algorithms. or: The student should choose whatever language she feels most comfortable with, because algorithms can be expressed in any language.

Argument

the actual value of this variable that gets passed to function, can be used interchangeable with parameter (30)

Sequencing

the application of each step of an algorithm in the order in which the statements are given

Selection

uses a Boolean [true-false] condition to determine which of two parts of an algorithm is used


Kaugnay na mga set ng pag-aaral

Ch 20 Preserving and Protecting Your Environment

View Set

Lección 10 10.4/Repaso Florence

View Set

PSYCHOLOGY 235 FINAL CAPONE TESTS

View Set

Ch.10 lesson 3: The Transfer Of Heat

View Set

match the organism with the disease it may cause

View Set

Linux Academy LPIC Exam 1 Study Guide

View Set

Additive Inverse and Identity, Multiplicative Inverse, Identity, and property of zero

View Set