Log in
Sign up for FREE
arrow_back
Library

Variables and Data

star
star
star
star
star
Last updated 8 months ago
15 questions
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Question 1
1.

Question 2
2.

Question 3
3.

Question 4
4.

Question 5
5.

Question 6
6.

I want to store a birthYear field in my database. What data type should this be, and explain your reasons why?

Question 7
7.

I want to store a phoneNumber field in my database. What data type should this be, and explain your reasons why?

Question 8
8.

Question 9
9.

Question 10
10.

Question 11
11.

Question 12
12.

Question 13
13.

Question 14
14.

yourList <-- [20, 10, 30]
myList <-- []
yourList <-- myList

myList <-- []
What is the current value of yourList?

Question 15
15.

On the X plane of a chart. How do we find the this distance between two point x1 and x2. Write an algorithm you will use to solve the problem.

Test with
x1 = -7 x2 = 2, distance is 9
x1 = 6 x2 = 10, distance is 4

How many more bits are available if you go from 32-bit computer to 64-bit machine.
32 more
2 raise to power 32
32 raise to power 2
Your program is comparing temperatures to determine how many patient's have a fever. Your selection statement's condition is not working correctly when the variable patient_temp is 98.6. What could have been the reason why?

IF (patient_temp = 98.6)
The format is incorrect for this condition
A round-off error occurred
An overflow error occurred
The test condition is invalid
What order should these be in to go from smallest to largest?
1. Binary --- 01110111
2. Decimal --- 111
3. Binary --- 01111011
1, 2, 3
2, 1, 3
3, 1, 2
3, 2, 1
A magnet school wants to advertise its students' success taking AP exams to prospective families. What's the best method to share the summarized data?
Post an image of the student results on the school facebook page
Create an interactive pie chart that can drill down to topics and overall scores posted on the school's website
Write a report for a marketing pamphlet
Send an e-mail to families with middle-school-age children
Which topic needs the use of programs the most to analyze the data to identify insights?

Note: They may all require some programs, but which one needs it the most.
The average number of students who drive to school each day.
The record of wins and losses for all sports teams under their current coaches compared to prior years' win/loss records
The number of library books in a school district that need to be replaced each year
The standardized test scores for current students compared to test scores across the country for the past decade.
A teacher uses a list to store the score of all his 50 AP CSP students. Which os these would be a valid index for accessing values from the list. Select all that apply. The name of his highest scoring student is peter!

Note: AP CSP syntax does not recognize negative index, but real languages like python would accept it.
-1
7.5
"Peter"
9
-5
60
1
0
names = ["Maria", "Jose", "Jeff", "Beth", "Sasah"]

What is the element at index 2
"Jose"
"o"
"Jeff"
"e"
nums1 <-- [5, 2, 1, 7, 5]
nums2 <-- nums1
what is
nums2[4]
1
2
5
7
How does lists allow for data abstraction. Choose all that apply.
Allows grouping / bundling related data Instead of managing individual variables for each piece of data, a list allows you to store them in a single container. You many not even know what kind of data types that are stored in it
Lists may offer operations like append(), sort(), reverse(), pop(), remove() etc., enabling manipulation of data without you having to deal with low-level details of storage and retrieval. Thus you may not even need to the logic behind these functions work, but you need to know what they do and how to use it
List is an abstract concept that uses matrices and matrix algebra, thus we do not need to learn matrices
age = []
age is an empty list
True
False
In AP CSP list syntax, the list starts at index 0
True
False