CSP-Programming, Data Analysis, Data Security, Computing innovations

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

A programmer uses this nested conditional in an online graphing calculator. IF (x < 0 AND y < 0) { quadrant ← "BL" } ELSE { IF (x < 0 AND y > 0) { quadrant ← "TL" } ELSE { IF (x > 0 AND y < 0) { quadrant ← "BR" } ELSE { IF (x > 0 AND y > 0) { quadrant ← "TR" } } } } When x is 52 and y is -23, what will be the value of quadrant?

"Br"

How many statements are in the program below? Display ("Boaty") Display ("McboatFace")

2

Marlon is programming a simulation of a vegetable garden. Here's the start of his code: temperature ← 65 moisture ← 30 acidity ← 3 DISPLAY (acidity) DISPLAY (temperature) DISPLAY (moisture) After running that code, what will be displayed?

3 65 30

Dahlia is creating a program to display Morse code. This is what her program contains so far: PROCEDURE sendA () { DISPLAY ("• −") } PROCEDURE sendB () { DISPLAY ("− • • •") } PROCEDURE sendC () { DISPLAY ("− • − •") } PROCEDURE sendD () { DISPLAY ("− • •") } PROCEDURE sendE () { DISPLAY ("•") } PROCEDURE sendF () { DISPLAY ("• • − •") } sendF () sendA () sendD () sendE () sendD () When this program executes, how many total calls does it make to the DISPLAY procedure?

5

Evelyn is making a race car simulation program. She accidentally gave two of her variables the same name: t ← 0 t ← 60 What will be the value of t after this code runs?

60

Shari is making an app to sing her favorite silly songs. Here's part of the code: PROCEDURE singVerse () { DISPLAY ("This is the song that never ends.") DISPLAY ("Yes, it just goes on and on my friends.") DISPLAY ("Some people started singing it, not knowing what it was,") DISPLAY ("And they'll continue singing it forever just because...") } singVerse () singVerse () singVerse () singVerse () singVerse () singVerse () singVerse () In total, how many times does this code call the singVerse procedure?

7

Danielle is programming a kitty simulator. Here's part of her code: hunger ← 6 cuddliness ← 9 playfulness ← 7 DISPLAY (playfulness) DISPLAY (cuddliness) DISPLAY (hunger) After running that code, what will be displayed?

796

Darrell is making a program to track his grades. He made the mistake of using the same variable name to track 3 different test grades, though. Here's a snippet of his code: a ← 89 a ← 97 a ← 93 What will be the value of a after this code runs?

93

DISPLAY (":") DISPLAY ("-") DISPLAY ("O") After the code runs, what is displayed

: - O

In April 2020, Twitter users started a trend of posting their high school graduation photos. The FBI issued a warning soon after about the risks of posting those photos on public social media accounts. Which of these is not a potential risk of posting an old graduation photo? An attacker could download the image and threaten to share it with the press unless the user gives them money. A stalker could extract geolocation from the photo to locate the user.

An attacker could download the image and threaten to share it with the press unless the user gives them money.

____________ is a way to take advantage of the large network of potential contributors online and funnel their resources into an output.

Crowdsourcing

Kimberly is trying to understand which of her devices and apps can collect information about her location. Which of the following statements is true? (Choice A) A If a device has no GPS receiver, then it cannot collect information about Kimberly's location. (Choice B) B If a company's privacy policy does not mention location data, then their app cannot collect information about Kimberly's location. (Choice C) C If a device has no connection to the Internet, then it cannot collect information about Kimberly's location. (Choice D) D None of the above

D

A company develops a mobile app designed for parents to monitor what their children are doing. The parents install the app on the phone, and it can record details like who the child is conversing with and what apps they're using. It can also record and store the geolocation of the child. Which of these questions from parents could not be answered by the recorded geolocation data?

Did my child hang out in the park in a group of more than 20 people?

Horacio is new to the Web and is concerned about his privacy while using a web browser. Which of these steps would NOT increase his privacy?

Disabling auto-play of video and audio files in the browser's settings

A software architect is designing the database for the Department of Motor Vehicles in their state. They need to carefully consider which information in each user account should be considered PII, so that they can better protect those fields in the database. Which of the following pieces of user information is least likely to be considered PII?

Hair Color

Problem Lucie is developing a program to assign pass/fail grades to students in her class, based on their percentage grades. Their college follows this grading system: Percentage Grade 70% and above PASS Lower than 70% FAIL The variable percentGrade represents a student's percentage grade, and her program needs to set grade to the appropriate value. Which of these code segments correctly sets the value of grade? 👁️Note that there are 2 answers to this question. Choose 2 answers: Choose 2 answers:

IF (percentGrade < 70) { grade ← "FAIL" } ELSE { grade ← "PASS" } and IF (percentGrade ≥ 70) { grade ← "PASS" } ELSE { grade ← "FAIL" }

________ is malicious software that's unknowingly installed onto a computer.

Malware

Benjamin is writing code for a medical software company. He would like feedback on his code and is considering either asking a colleague for an in-person code review or uploading the code to a collaborative code review program. What would be the most likely advantage of using collaborative code review software?

Multiple colleagues could see his code and give feedback on ways to improve it.

Joline is writing code to calculate formulas from her electrical engineering class. She's currently working on a procedure to calculate electrical resistance, based on this formula: Resistance=Voltage/Curret ​ start text, R, e, s, i, s, t, a, n, c, e, end text, equals, start fraction, start text, V, o, l, t, a, g, e, end text, divided by, start text, C, u, r, r, e, n, t, end text, end fraction Which of these is the best procedure for calculating and displaying resistance?

PROCEDURE calcResistance (voltage, current) { DISPLAY (voltage/current) }

Which of these is the best explanation of pseudocode?

Pseudocode is a language that represents concepts across programming languages, but cannot actually be run by a computer.

Ada notices that her classmate's program is very long and none of the code is grouped into procedures. How can Ada persuade her classmate to start organizing their code into procedures?

She can find places where her classmate's program has repeated code, and suggest using a procedure to wrap up that code.

Eloise wants to share her political views with family members living in another state but doesn't want her posts to be viewed by potential employers in the future. What is the best strategy for ensuring that?

She can send email messages with family members CC'ed on the email thread.

Identify which variables store numbers and which store strings: title ← "I am a rock"

String

Ahmad is a graphic artist. He tweets a photo of his high school yearbook cover that he helped design. In what ways can the tweeted photo be used as PII?

The high school name indicates where Ahmad went to school.

An account is protected by multi-factor authentication with these two-factors: An alphanumeric password A code generated by a hardware device What would attackers have to steal to break in?

The password and the hardware device

Kira sends an email message to a teammate about a conflict she's having with their boss. They later discover that the boss found out about the contents of the message. What's the most likely way that happened?

The teammate forwarded the message to the boss.

In 2014, Yahoo suffered a data breach that exposed details of at least 500 million user accounts, giving attackers access to real names, email addresses, dates of birth, and telephone numbers. With access to that information, which of these actions could be taken by an attacker?

They could email a user with a threat to reveal private information. and they could spend spam messages to a user's mobile phone.

Lana visits a news website she's never visited before. She notices a section called "Recommended for you" with a list of articles that are related to articles she'd been reading on other news sites. Which technology was most likely responsible for the recommended articles?

Web cookies

This program uses a conditional to predict the hair type of a baby. IF (fatherAllele = "C" AND motherAllele = "C") { hairType ← "curly" } ELSE { IF (fatherAllele = "s" AND motherAllele = "s") { hairType ← "straight" } ELSE { hairType ← "wavy" } } In which situations will hairType be "wavy"?

When fatherAllele is "C" and motherAllele is "s" and When fatherAllele is "s" and motherAllele is "C"

Yuto posts a tweet on his Twitter account with a photo of himself taking a bubble bath. A few months later, while preparing for a job interview, he decides to delete the photo in case the job recruiters find it. Once Yuto deletes the tweet, can the recruiters find the photo?

Yes, if the tweet was archived by a web archive service or uploaded elsewhere by others who saw it.

cache

a collection of items of the same type stored in a hidden or inaccessible place.

This code snippet stores and updates a list that represents files in a folder: fileNames ← ["cow.mov", "dog.wav", "cat.jpg", "bird.avi", "fly.gif"] DISPLAY(fileNames[3]) INSERT(fileNames, 2, "goat.tif") INSERT(fileNames, 6, "spider.html") DISPLAY(fileNames[3]) What does this program output to the display?

cat.jpg dog.wav

The participation of the general public in scientific research is known as...?

citizen science

A ________ is a small amount of text that helps a website track information about a user across multiple pages of the website and personalize the user's experience on the website.

cookies

Nanami is researching how much software engineers make. She's writing a program to convert yearly salaries into hourly rates, based on 52 weeks in a year and 40 hours in a week. The program starts with this code: salary ← 105000 wksInYear ← 52 hrsInWeek ← 40 Which lines of code successfully calculate and store the hourly rate?

hourlyRate ← salary / wksInYear / hrsInWeek and hourlyRate ← (salary / wksInYear) / hrsInWeek

Greg is hosting a chocolate tasting night for his friends to taste chocolate truffles. He's writing a program to help him plan the festivities. The box of chocolates comes with 35 truffles, and there will be 6 people at the party. numChocolates ← 35 numPeople ← 6 Greg is going to distribute the truffles evenly and then save the extras for himself. Which line of code successfully calculates and stores the number of extra truffles?

numExtras ← numChocolates MOD numPeople

Identify which variables store numbers and which store strings: seconds ← 50

number

A ________ attack is an attempt to trick a user into divulging their private information.

phishing

Casper is programming a game called GhostHunter Extreme, where players must capture as many ghosts as possible in 5 minutes. Which variable would he most likely use a string data type for? playerName: The player's name score: The number of ghosts captured

playerName: The player's name

Identify which variables store numbers and which store strings: recorded ← "Dec 14, 1965"

string


Set pelajaran terkait

Chapter 20 Multiple Choice Questions

View Set

Chapter 39: Oxygenation and Perfusion

View Set

Insurance and Licensing Chapters 3-4

View Set

communications final exam fill in the blank

View Set