1.1.1-1.1.4 quiz

¡Supera tus tareas y exámenes ahora con Quizwiz!

what is the biggest number that can be stored in 1 byte?

255

a programmer is creating an algorithm to solve a problem. What is she working on?

the steps that need to be in the program

what is input

the way that the computer gets information and data from the keyboard and the camera

why do we have high-level programming?

to make it easier for people to write codes

what type of problem cannot currently be determined or explained by an algorithm?

undecidable problem

what is 67% divide by 10?

7

what is the difference between = and == in Python?

= means assignment --to give value to a variable == means is equal to-- to check if two things are the same, results in True or False

A certain game keeps track of the maximum and minimum scores obtained so far. If num represents the most recent score obtained, which of the following algorithms correctly updates the values of the maximum and the minimum?

If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.

Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, they should be reordered as 4, 9, 16. Which of the following algorithms can be used to place any three numbers in the correct order?

If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.

A teacher has a goal of displaying the names of 2 students selected at random from a group of 30 students in a classroom. Any possible pair of students should be equally likely to be selected. Which of the following algorithms can be used to accomplish the teacher's goal?

Step 1: Assign each student a unique integer from 1 to 30. Step 2: Generate a random integer n from 1 to 30. Step 3: Select the student who is currently assigned integer n and display the student's name. Step 4: The student who was selected in the previous step is assigned 0. All other students are reassigned a unique integer from 1 to 29. Step 5: Generate a new random integer n from 1 to 29. Step 6: Select the student who is currently assigned integer n and display the student's name.

what is boolean?

Type that has just two values: true or false.

what is a behavior in a class called?

a method

there are many programming languages. How do computers understand the different languages?

compilers and interpreters translate the code to machine language for computers to read

In object programing, what is a class?

definition of an object

The variable age is to be used to represent a person's age, in years. Which of the following is the most appropriate data type for age ?

number

what happens when an integer gets too big for its memory location?

overflow and positive number becomes negative


Conjuntos de estudio relacionados

PSYCH 111 Chapter 4 States of Consciousness

View Set

Medsurge II - Chapter 25: Nursing Management: Patients With Hepatic and Biliary Disorders

View Set

EMT Chapter 3 Lifting and Moving Patients

View Set

Chapter 9: Nursing Care During Normal Pregnancy and Care of the Developing Fetus

View Set

Google Ads Certification- Measurement

View Set

American Airlines - STAR Method Questions (Glassdoor)

View Set

MGT 352 Ch. 9: Compensation (9 MC, 1 SA)

View Set

Eduqas poetry anthology theme: DEATH AND LOSS

View Set