You are on page 1of 20
‘AP Computer Science Principles *ractce Exam 1 < 137 AP Computer Science Principles: Practice Exam 1 Multiple-Choice Questions 2 hours Number of questions: 74 ‘The multiple-choice questions represent 60% of your otal sere Directions: Choose the one best answer fer each question, Some questions atthe end ofthe cst have ‘more than one correct answer; for these, you will be instructed to choose two anawer choice, ‘Tear ou the annwer sheet on the previous page and grid in your answers using 3 pene Consider how much ime you have let before spending too much tie on any one problem, 'AP Computer Science Principles Exam Reference Sheet On the AP Computer Science Principles Exam, you will be given a reference sheet co use while you're raking the multiple-choice ces. A copy of this even-page reference shes included inthe ‘Appendix ofthis book (reprinted by permission from the College Board), ‘To make taking his practice res like taking che actual exam, you should tet out the eeference sheet s0 you can easily refer it while raking the test. Save these reference pages since you'll need 10 use them when you take AP Computer Science Principles Practice Exam 2 If you lose the pages, che reference sheet is alo avllable nea the end of the PDF publication, “Assesment Overview and Performance Task Ditezions for Students” on the College Bond Website: Here isthe URL: hpslfapeencal.collegeboard org/pdlap-xp-sudent-task- directions ‘ palhcourse=ap-computerscience principles GOON TO THE NEXT PAGE, 188. > STEP 5, Buld Your Test Taking Confidence 1, You won she lotery and elected to feceive Jump sum! The largest number the banks com puter can sore is 2°'~ 1 or 2,147,483,667. ‘Alter depositing your lowery winnings of $2,500,000,000.00, shat wil che resule be? {A) Your winnings were more than dhe largest ‘number the Bank’ compucers could hold, s0,n overflow eror will occur. (@) Since decimal numbers are stored impre- isly in computes, 2 rounding eror will ‘The amounc willbe represented in machine code format, 0 converting it to decimal will show the balance in a more readable format (D) The amount will be represented in hexa- decimal, so converting it ro decimal will rake the balance more readable. © 2. You stop by and purchase your favorite snack fer shoal anc day. You noice the ash register ‘shows che change you ate oted as: $0.04999999 rather than $0.05. How i this posible? (A) The cash coger DISPLAY procedure has (®) Since decimal numbers are sored impres cisely in computers, 2 rounding. error cccutred. (©) Its displaying the change owed ina difer- ent currency. (D) The amour is represented in hexadecimal rather than decimal, Alert the store clerk v0 ‘make the conversion to decimal. 3. You are assigned sparking space in a large pak ing loc by an autornated machine. You ecogrize ‘hac the parking space number is displayed in binary, bur che parking spots are labeled in decimal numbers. Convert the parking space number 10011011 to decimal co know where to park and avoid geting coved, (a) 154 @) 155 (©) 157 (0) 9F 4, When designing a web page you se a ob you vant o use listed in hexadecimal a #500878. Which coor is i, given the decimal equivalents (Red, Green, Blue)? ) 62, 76,414) (8) (60, 118, 78) (C) (80, 200, 120) (©) (128, 310, 170) 5. You are designing 2 UI (usr interface) for use by muliple inernational cveler. How can you best communicate the options and farures ‘of the software program so most people can tunderstand them? (A) Write the Ul in Spanish and Chine, ewo of the mos common languages ‘poken worldwide (B) Use an API to interface with a warlation website For those who need i (©) Provide a link to an online dictiocay so words users do not know can be quickly Tooled up. (D) Use images +0 repretene feaxures of the program. 6, The principal ited the programming das ro write a program to reserve parking spots in the seudene parking lo. She wanes seniors 10 have the best spor. What is the bes way the pro- ramming clas en verify a student i enor? (A) The program can loop through he school dice rosters for every student nane. (B) Grade can be an inpue field thar is then pissed to the procedure co slet an avail able spot. (©) Use an API to integrate with the choo! information system hosted offset check agnide level. (D) Have seudents upload a photo fom che school rita showing thee school ade ‘with thelr pang spor request. G0 ON TOTHE NEXT PAGE AP Computer Science Principles: Practice Exam 1 ¢ 139 7. You have to change a program writen a year ago by scmeone ele. A sample section of code is below. How could the orginal program author have helped someone making changes a ater dae? foce'= tree fnePenp tpieyiseca, cong) play (wong) 8. What dos the code do? (A) Plysa song fom the ply. (B) fa song requested by the wer isin the lyin, plays it otherwise adds it 10 the end f the playlist and then play i. (©) Mowe song fom ies current postion in the pylist co the end of, chen play che next one in he list. (©) lenis songs the user wants to heat, but does nt own. Provides a way to purchase ‘the song and appends ito cei playlist. 9. In the code, if play” sa procedure, what does “song” repesencin the line: play(song)? (A) Ic is the name of the procedure for docu mention purpose, (8) Ieisan inp value where the user requests the sang ea he played nL. (A) Provided the orginal program requirements (B) Added a video describing the program design and funcconalcy (©) Used procedure and variable names that described theie purpose and content (©) Frovided wrtten documentation of the application development proces ied. (C) lesa value being pased to the procedure via an argument thae will be used as a parameter in the procedure. (©) Iris an expression that moscbe evaluated to be used inthe procedure. Which statement is NOT eruct (A) Lower-level languages are easier to debug ‘because the language is closest co what the computer executes, (8) Higher-lrel languages ae easier to debug because the language 8 closer to natural language. (© Lower-leve! abstraction. (D) Higher-lvel languages ae ease for people to code in because they are more ike nat ral language languages provide less Ifa simulation of the tolar eclipse is setup to test the effectiveness of gate sally view the sun, which scenario below fe mos likely if the firs test shows the glasses are inadequate? (A) The tam can modify the degre of dark- ress and recest quickly to determine the threshold of effectiveness (B) The team should sop the tex and notify the company that maker the glass, (©) The team should rerun the test multiple sims to ensure the reuls ae valid (D) The cam should rewrite the code forthe simulation, and then retest. GO ON TOTHE NEXT PAGE 140. > STEP 5, Bud Your Test Taking Confidence 12, A simulation of conditions for 3 new sensor to bbe used with selFdrving cas is being designed, ‘The pseudocode For the ee is alow. hen detect abject 3 feet or closer. ‘dope co Sncident_ counter Which conditions should the simulaion est shout the senor? (A) Ifthe incident councer > 10, then the en sori succes, (8) IF the incidenc counter is 0, then the sen- sor is succes (©) See up objects at 3 fect, les than 3 fet, tnd greater than 3 feet to determine the action ken, (D) Ifthe car avoids an accident, then the sen sors succes 13, A series of binary sumbers appears on your computer screen. What do they tepeesen? (A) The source code forthe program afer compilaon (8) The machine ineaction dae used he (©) The error message before converting it swords sing che ASC table (0) Ie is imponible co tell the represenation without knowing the context of thei we. 14, Which ofthe following will evaluae to “true”? 1. (tre AND true) OR (rue AND fae) fi. NOT(erue OR fale) ii, NOT(ke) AND NOT(eue AND false) (W) iand it (8) iand ti (©) hand i (D) it and 15, What outcome wil the Boolean conditions in the diagram produce at step 1,2, and 32 © (A) True, 2Trve, 3-True (B) False, 2-Fase, 3-True (©) 1 False, 2-True, (D) ive, 2Fae, 3-ale 16, A camera watching an eagles nest starts recor Jing when a motion decctor stars, Which of the fallowing is metadata? (A) The laeade and longieude ofthe nest (@) The dae and time the motion is deeecred (©) The numberof eagles using che nest (D) The numberof frames per second the cam- cra recouds 17. Susics mother wants a copy ofa photo from a Family vacation thac Sue took. The picture i too lage #0 emul, How should Suse compres the image if her mother wants prin 2 lrge copy of i suitable for faming? (A) She should use lossless comprestion ech- rigue, which wil be needed to print = ‘version with high enough quality frame. (8) She should use a lossy compeesion tech- nique +0 obtain enough compresion to send the image. (©) They should be combined for the bese -compresion technique (D) Any compression echnique will be suf- cient inthis case (GO ON TO THE NEXT PAGE ‘AP Computer Science Principles: Practice Exam 1 18, Wher listening to an online music service, you request songs “ke” a specie song, How does the musi sie determine what to play? (A) I plays songs you have played previously. (8) Ic plays the mose requested songs fiom all Iceners (© i uses date-mining cechniques +0 deter- ‘ne patterns in che musi that are similar, (D) I plays aeandom selection. 19. Which one ofthe following would be a good projec for etzen scientists and why? (4) Counting pine ee in urban conditions to et accurate data about che spread ofthe Be beele (B) Rentffing new sears using personal tel- ‘ecopes to keep cox lower forthe tacking cxgaization (©) Reading diferent genre books and evauat- ing ther so book publishers kaow which ‘9pes of book manuscripts to accept and rrarker (D) Counting fish ina lake to know ifthe fish sae safe © consume 20. Whar describes the proces of searching data sets for incomplete dara records to process? (A) Classifying (@) Cleaning, (© Custering (D) ering 21. A teacher wants ro determine student opinions cof computer science before and alter raking 4 coune, She gives students a survey on the «1a fist and lst days of lass. The survey includes questions about students’ impretions about ‘computer scence, ifthe teacher communicated fective ifthe teacher was postive about the ‘course material, and if sudents gave thee best effort in the course. What questions can be Aetermined from the survey date 4, TF scudents who moved fom a negative to positive Impression of computer scence Aer taking the course alo thought the teacher communicated effectively J, Which stadens plan eo major in computer science after aking the coure fii If the students who didnot change cheit cxisting view of computer science after tak Ing the couse gave their bet effre in the (ai (8) iad (© itand (©) ist and 22, Given the rable of data about car accidents, which outcome is supported by the daa? (A) Drivers ages 16-25 havethe eves accidents (B) More accidents occur on the weekdays (©) Drivers age 26-50 have fer accidents than the ether owo age groups. (D) Aduledrvers have more aecients on week days during rush hour Number of Most |Numbor of | accidents | Number of commen |accidents by |by 26-50 | accidents by ‘Accident | Accident typeof |16-25 yr old | yr old | 51-100ye.” | Total umber | occurred on | occurred on sccdent__|rivers | arivers_|old drivars_|of accidents | weekday "| weekend Rearend 31 21 250 7m 257 315 collision Ran lighear | 215 12 132 8 191 297 inerecien Ran sop 1a a oy assay 84 ie | GO ON TO THE NEXT PAGE. 142. > STEP S. Bld Your TestTaking Confidence 23, Which of the following is an example where analysis of large data ses would NOT be able ro deni potentially valuable informacion? (A) Ldenaffing vs factors for ceesn health (8) ldencfying which aspects banks should focus on 9 minimize loan defaults (©) Erabling companies co know when co schedule placement of equipment pars Ioeause of usage and increased mainte- nance on them (D) Enabling busineses to know whae co pro- dice and when for maximum sles 24, Why do businesses and scents artempr 10 analya big data? (A) Tegan insights smaller subsers of dara may ot provide (8) Toconfirm findings from smaller dara ers (©) T densify potential problems in che smecadaca (D) To obtain economies of scale with hard- wae needed co sore the dara based on Moores law 25, How do the World Wide Web and che Internet work together (A) They perform the same functional. (B) The Web wses HTTP to share compute sional artifacts using the Internet (©) The Toverner uses the Web to connect devices co share dats (D) The Inernes hae the “deep” net and “dak” ret but the Web doesnot 26, If fre occurs a «major Internet ul, what is the resule (A) Taverne af wil be routed to ies destina- tion a diferexe way becaute ofthe redu ancy bull into che Internet. (B) The part ofthe globe chat i served by that Intesnet hub will be dawn because of che endevo-end architecare ofthe Inernet (©) Different IP address willbe assigned ro devices that were impacted by the wnavall ability of she Internet hub (D) People can ue dedicated phone lines as a ‘backup with no change in service 27, In thefallowing web addes, bow many domain levee are here? higpllanyrime anyway anyplaceedulessonsnoes! spexdoce we @5 4 3 28. Ifa company is uying to determine whether co ‘upgrade its bandvidth based on the folowing. sgaph, whae shoud they measure? (A) Amount of data uplosded sic includes sraegic company backup data (@) Amoune of data downloaded asic has the laegest impact on the bandwvideh (©) Frequency othe peak times (D) Type of devices employees use on the cower ttn eseesseues Sin pans G0 ON TOTHE NEXT PAGE, ‘AP Computer Science Principles: race Exam 1 < 143; 29, Whyisthetrust model ofthe Inremetinportane? (A) Te ensures the private security hey has noe been compromised (®) Ic esblishes a dedicated line berveen two destinations to ensure secu (©) Te enables the secure wansferof data, such 282 credit cad transaction, which allows online purchasing (©) Ie ensures the privacy of customers making ‘online ansscions 30. What happeas in s DDoS atack? (A) Boss search for malware-derecting sofvare thats outof date and prevents the uploading of new vesions without the owner krowing, (8) Firewall are deactivated £0 malware can center the newwork, (©) The targeted sic is looded with too many false requests and crashes, (D) Senscve dais not encryped belore being. transmiced over the Internet making it vulnerable ro interception, 31. Which option below is @ potential negative resul of storing data inthe loud? (A) You have to rely on someone else main= ‘ain che security ofthe daca. (B) Online collaboration could cesule in acci- Aencally overwriting someone's changes co document (©) You muse score duplicates of data stored in the cloud in ease you cannot acess your data when needed. (D) The company storing your data could hold itor ransom until you pad exe es. 32. IF an organization wants to change is websice ‘name from .org to edu, whar do they need 10 oro ensue chey can sil be found on he Web? (A) Register the new name with a DNS (@omain Name System) se (B) The organization can start using che new ‘name immediately since only the top-level domain changed. (©) Notify 1ET, the organization thar main- tains names on the Inerne. (D) Pose the new name on the organies- sions website up eo 10 days prior to the sritchove. 133. Which of the following ie ue about packes? (A) The receiving device acknowledges the ise and lase packets 10 indiate receipe of the data seam. (8) Packets travel in order to thei destination. (©) Packets follow the shortest path to the destination (D) Packets are reasembled at their Anal destination, 34. How do TCP and IP interact? {A) IP Forwards the data the PINS sever to deni which TCP to use. (B) TCP hands off control to HTTR, which passes ito IP (©) TCP creates packes from the data 0 be sent and transfers control to IP for routing, ‘TCP then reasembles the packets at the destination (D) IP uses the SSL in conjunction with TCP 0 seeurey send data. 35. Dara mining allows organizations to proces hhuge data ses to find new paterns, connec tions, or opporeuities, Which ofthe following Is NOT a dowaside of dita mining? (A) Ie may require having to ein staff and allocate resources based on data reals. (8) More relevant information i included on the company’ webs (©) Ic is expensive to eallet store, and proces dha, AD) leis isk for decison making if the dara is interpreted incorrectly 36. Compares have enabled new innovations in variety of industries. Inthe entrainment busi- es thas become much easier to purchase and share new music. What concern has been raised asa rele (A) People ae modifjing other peoples con- tent and calming the Creative Commons licensing allows i, (8) People ae being discovered for thee music because others are posting it to music- sharing sie, (©) People ate shasing content without the sauthusfowaer’s permission. (D) Anise are adding thee masie ro sereaming services with Creative Commons licensing, GO ONTO THE NEXT PAGE 144 > STEPS. Bud Your TestTaking Confidence 37. Which of following ate legal and ethics! con- cerns because of DMCA? (A) Peceropeer nexworks used for illegst fle sharing {B) Matic and movie downloads and steaming services noe charging enough for hee serves (©) Licensing sipulations that allow incorpo- rating music into other artforms (D) Contalled intellectual property sharing 38. What isa benefit of the goverament posting databases Foe public use? (A) Ieisaway to identify the need for new poli cles and regulations. ‘Consumers can learn more about how cheit individual daa i being collected, sored, and used. ‘Companies can opt out to prevent com- pettos From learning about ther busines (D) All busines can access the data ae no cot, ding those businesses that would otherwise nor have the resources to obtaa the data on thet own, 39. Which algorithm will display the smallest num- bern lis of posicive murber? Ame Max is a variable holding che largest aurbr in thelist. ® oO (A) moat c 1 (erates < mae) 1 } Drsetay (onalteat) ¢ ® i , } prsetay C 1P (enaiiest > sum) { DIgeLaY (apatteee) a 2 8. { , For a binary search to produce accurate results, ‘what must be true ofthe dae (A) The data muse be unsorted. (8) The dara muse be sorted (©) The data must nor have duplicates (D) The data muse be fewer than a billion tecords, Otherwise the search requires too many tesourees fr processing. Which ofthese is a Boolcan expression? (a) x- 57 () t= comp + 320 / 300 (©) (romp > 32) Mne2-a266 42 ‘What can be determined fiom the following program flow? DISELAY (aignscere() (A) A game is played by calling different procedures, (@) An error will occur due to invalid proce- dure names (©) Paramecers are missing from the proce- ‘dares resulting in a runtime error. (D) A compile rime eror occurs due to Scorel) and HighScore0. ‘Which searement's format is incorcec? iF aor oe >) ( DISPLAY inossage) GOON TOTHE NEXT PAGE AP Computer Science Principles: Practice Exam 1 < 145) 44, Which alporishen should be ured to find « phone number on a contact lit? 1 Sore the contac list by name Search forthe phone sumber using a binary search Display the correct phone number u, Sore the contac lit by area code Search for the phone number using a linear search Display the eorree phone number wr @n (©) Land I are equally effective (D) A combination of both I and Il should be sed 45. Why docs a computer playing chess use a heu- iste algoridh? (A) Teensues the computer only wins cerain number of times making i a more enjoy- able experience for people. (©) Ieensures humans only win a certain per- centage based on titi (© Te takes too long to analyze all posible moves, so the computer rakes dhe next best (D) te checks each possible combination of moves fr the bet move, hotoey = hotbay © 2 c { ccotdoay = coldbay + 1 46. What does eration sith computer wience loops men? (A) Executing code once (B) Repeating bloc of code unl a condition (©) Duplicating a section of code multiple times ina program (D) IdenufVing che erer condition 47. lit named snacks exntains the vals: fnacke = (‘chocolate spesnuce® “granoiar, “anipe", "grapes ‘What wil the value snacklplace] contain? 1A) 5, the numberof ies in the ist (B) 6 the number of leter: in the word Spar (©) grapes, which i the valve inthe Sch posi- tion ofthe lst, (D) Err alse cannot be accessed in this way 48. Will both ofthe {allowing wo blocks produce comrect result? Assume all variables have been propery iniilized. (A) Only Black 1 is cones, (8) Only Block? is conece (©) Both blocs are correct (D) Neither blocs comet. Bock 2 1 (eenp < 80) ELSE IF (temp s 60) c 1 BEB = Potoay + 2 GO ONTO THE NEXT PAGE 146 > STEP 5. Build Your TesToking Confidence 49. Determining that an algrithrn is ineactable (A) an acceptable amount of time even for large dat et (B) less time for worst-case scenarios than aver age scenarios. (©) an exponential amount of time possibly ‘ven for small da sets making icunable to run for lage dataset (D) 2 fracional amount of time for fracional values 50. Which order has the progesmming languages in most absuact to lest abstract order? (A) Te-based language, assembly language, block-baed language, machin language (®) Block-based language, texe based language, ‘machin language, sssembiy language (©) Machine language, assembly language, block-based language, text-based language (D) Block-based language, cex-based language, sembly language, machine language 51. Which typeof programming sazement includes Boolean conditions to determine the section of code to execute? {A) Functions (B) Complex (© Selection () Contesting 52. Which se of code will alculate the leer grade correcly? Assume che average is variable hold- ing the sradene average. 4 (grade > 69) i x arate > 79) i rade +B c IF (grade » 09) ® TP (average < 59) t 1 (grade « 69) | arate = 6 "ap (grade < 79) grade = 8 i WF (grade < 03) grace = 3 i GOON TO THE NEXT PAGE AP Computer Science Principles: Practice Exam 1 < 147 © 53. The code below is robot algorithm. Which da- TF averace > 90) am matches the code? see = a ov. Forinao|) tne eee 4p (grade » 201 fama) wove“roneana)) Ml scale ~ » Sorat. xen) room urrt) theme = FP (grace < 60) t grade =D © TF taverage > 85) ©. i t IF (grade « 65) t } ¢ t GO ON TO THE NEXT PAGE, 148 > STEPS. Buld Your Test Taking Confidence 54, What benefc does an API provide? (A) Ieallows programmers co share their code via che API for other ext. (@) Ie connects sofcwate components provid ing preswrinen and tested code avaliable for we (©) Ieprovides algorithms for difficuls code to be reviewed. (D) Ie provides documentation progammers can use for thie programs eather than cre ating their oven. 55. What isthe valu of afer the code below runs? TROCROORE caleTenp (temp) ¢ newton « (5/3 + (temp ~ 321) RETURN (aowtenp) ) x = catetenp(s0) 56. Whar is the value of y after the following wo @ 2 3 o4 ; sot) anes 57. What i displayed afer che following code uns? yous Ca w 10 @) 15 (© 20 (0) 25 158. Which ofthe following owoalgorichme produces the sum of che elements in the list? Assume the leis initialized and i na emp. (A) Block 1 (B) Block 2 (© Blocks 1 and 2 (D) Neither Block 1 nor 2 ) Drseuay(vahe total ie: *, aun) (GO ONTO THE NEXT PAGE [AP Computer Science Principles: Practice Exam 1 59. Whar wil che fllowing code produce? t DISPLAY (“Hele Woriai*) (A) “Hello World" will be printed muliple (B) The code inside the REPEAT UNTIL loop (©) The REPEAT UNTIL loop never ends, cre~ ang an infaie loop. (D) The program wil havea runtime ero. (Questions 60-62 refer tothe following code, 1 i 4p wor(ensck = "benane”) i ) ‘APPIN (enacks, “banana*) (60, Whar wil dhe code dgpay? (A) popeora, candy, grapes, apples, banana {) prpcorn. candy, grapes apple, banana, (©) popcorn, candy, grapes, apples, banana, bunana, banana () prpcor, candy, grapes, apples, banana, bunana, banana, banana ‘61, What isthe index poston of apples? 3 @ 4 Os Os < 149 (62. What isthe value of snacks after the following. cade s ran? eanay", *grapes", (A) 5.6.7.8, candy, grapes, apples, banana (8) popcom, candy. grapes apples, popcorn, candy, gaps, apples (© popcorn, popcorn, popcorn, candy, grapes, apples, banana D) popcorn, popeor, popcam, popcorn, pop- «om, popeocn, popcorm, popcorn 63. Whacis displayed afer the folowing code runs? popcorn, DISPLAY (Linel + lined) (A) Error message, cannot add text feds (B) Good luck on the AP ex! (©) Good luck fn the AP exam! (D) 24, which isthe number of characters in the text felde What is an iterative software development pro- cxss designed 10 do? (A) To produce beuer sofovare with a proven process (B) To shorten the time of developing software by beginning 1 code while the requirements ate being determined {© To elimina che testing ep by using only ADs (D) Tio develop ic sight chefs time through the iterative proces GO ONTO THE NEXT PAGE 150. > STEPS, Bud Your TestTaking Confidence (65. The programmer tess an app she wrote using one ec of test cases Since the app was developed for her personal use does it need to undergo further vexing? (A) Ye all oforare should be tested with vat- cy of est caves to ensure the code works a expected. (B) No, since the app is for personal us, less stringent rerting i acceptable. (©) Addicional cesting is required only when there are more chan 25 lies of code (D) Additional testing is needed when proce- dures are used, 66, Which set of code will move the rbot fom sare to sop and end facing the correct direction? The robot may not move into gray blocks Sep = © ove pomuaao() 7 Cloud-based data storage is best when what con- dione are tre of those working with the data? Select so answer, (A) They ate in z secured location. (8) They are in sparse locations. (©) They are dealing with sensitive dat. (D) They have limited srorage a ther locaton Data has been collected about medicine wil reauls. The peivey of those in che trial needs to be protected. daca aggregation sufficient if the patiene name is nor used but zip code, doe- tor name, and pharmacy are used and the daca is puswoed proteced? Selec wo answers. (A) Yes, Because s name is no associated with (B) Yes, because the dai aggregated. (©) No, because the 2ip code and pharmacy could be used to dell down co potentially densify patients in the ei (D) No, because the data flteing could sil search for doctors involved in the eal and if ‘ed with 2i code, could Mendy poendial participants. GO ON TO THE NEXT PAGE ‘AP Computer Science Principles: Practice Exam 1 < 151 69. In putting together a tear, the project manager ‘wants co have scents, gamers, ats, and ‘computer scientists. What Is the argument for creating this team? Select wo answers. (A) Te will help gee bugger money from each division, (@) Each can work independently on thee part snd then combine their work. (©) Collaboration effort help save time and produce beer real. (D) Diffeear perspectives will help develop 2 beter produce 70. Which two protocls are responsible For break- ing the data into packers and putting ie back together at the desinaton and routing the packets ro their destination? Select cwo answers. ) Top @) HTTP (© FIP (oP 71. Why should public key encryption be used? Sdleee ro answer (A) Tris shore than other ciphers (®) Ie cannot be broken with brute force techniques (©) Teuses an asymmetric key making i harder todecype. (D) Ie ses a symmetic key making ic harder to deerype. 72. Which ofthe fllowing can be stored in a bie Select ewo answers. (A) The result of 2 number MOD 2 () A Boolean variable (©) A variable that could hold sange of post ve values () A compucer that can be on, off oF in “sleep’ mode 73. Sending data offic ic a disaster recovery backup strategy: Which concems can oecut from this strategy? Select swo answers, (A) Security concerns if unencrypted data is transfered offsite on regula basis (B) Privacy concerns if the data were inter- ceped and decrypted exposing peso (©) Compatbilicy issues as computers and software change, che data may be unussble ‘on newer sysems (D) Compression issues with sending large ‘quantities over the network to a server in a diferent location 74. How has cloud computing helped with com- ‘munication? Select evo anowers (A) By allowing axynchronous communication with email and tex messaging (B) By allowing synchronous methods of com- ‘munication such a video conferencing (©) By reducing the need for camlaton ae vices since dara can be quickly acesed fom anywhere (D) By providing cloud-based presentation ‘ool 0 use wit local data STOR End of Fram 4152 > STEPS. Build YourTes-Taking Confidence AP Computer Science Principles: Practice Exam 1 Answers and Explanations 1, A—The huge lowery winnings added to your previous balance were more chan the ligest Integer the bank account could accommodate san overflow eror occurred. 2, BFloating point numbers, (eg, numbers wich factions) are cored imprecisely inthe computer and can cause rounding eros. Thi s why they should mot be wed for monetary transactions ‘The clesk owes you a nickel 3. BHTake the binary number and create a able ofthe posers oF 2, starting with 2°in che righe- ‘most poition. For very column there is a1 in the binary number add th eoresponding value of 2 PAE ea eee ws 6f[32 [16 | af 4] 2 [1 Se 128416484241 4, C—You need so convert the number for each color fom hexadecimal ro decimal: 50 for Red, C38 for Green, 78 for Blue 5040101 0000, Red: 64 + 1 GB (80, 200, 120) 8,5~ 1100 1000, 5. D—The goal ofthe user interface is o provide smooth and understandable experience. Asan beacon, images can provide the bese way for ueere co understand the features ofthe sof ware IF people do nor speak the languages the softare is using to display messages, then they may not understand that Google Translate and a dictionary are availble options. Images provide the bese option fr this user interface, 30 —_Geen: 128 +64+ 8 = 200 6, B—Using a parameter with the procedure 10 Indiate grade sth bes soluion. Due ro secu tity and privacy risk, che students should nox Jiegiate with the school sytem databare, Add- Jing step co upload a photo ie ineficient ei Joop to go though the diticerotere each time. 7. C—Using wellnamed procedures and vatiable ames makes code mote redable and under standable. The orginal program requirements ‘would not be useful as it may nor have been Updated as the program was modified. Similar, a video may belp to explain che original pro- framers thoughe process, bur ic may be out fof date and not very uel for undersanding the code they wote. Documenting the devel: ‘opment proces will not be usefil to someone changing the code, ‘8, BLifthe song the wer yped i inthe pais, ic will be plyed and 2 Boolean variable marked 2s true for owmership ofthe sng, Aer checking all songs in the pli, che song wil beaded vo the Plays fies no aleady there and then played. 78,,=0111 10002, Blue: 64+ 32+ 16+8=120 9. C—When calling the procedure, play, the ‘vale paced to itis passed using an argument Ie i a paramere when used internally in the procedure 10. 2 4. 15. 16, ” 18, ‘AP Computer Scionce Principles: Practice Exam 1 ¢ 153, ‘AX Lowerlevel languages are written in ‘code loser 19 machine language. These are more dif ficulr o debug for mose people because the code isles lke natural language ‘AMA benefit of medels and simulations & che ability to modify a variable and retest quickly. Running che est wich the sume values does not help the analysis. Running one test and then stopping is not an dfecive use ofa simulation. ‘Unless an ervor was identified, which it was not in this seenaro, chen ewitng the code wl not determine if the ghsses are effective 10 safely protect people eyes Since the sensor is set o detec objects within 3 fee of the test should mestute the sensor actin a ll f the boundary conditions. D—A binary number can represent all ypes of data, but knowing the contea for ite use deter- ‘mines how itis interpreted. The software knows ‘hac the number represents at each pon inthe program and inerprs i correctly. BLThe only time ax AND condition is rue is when both conditions ae tre. The only time an OR condition is ue is when ether or both conditions are tue. Evaluating the conditions provided, only {andi are rue ©The only time an AND condition is «rue Is when A and B are both tue. The only cme an OR condition is rue is when either or both ‘conditions ate rue, Evaluating the conditions in the digram wil preduce the results in answer C. D—Ererythng is dita about the nest and the eagles using the nes except the number of frames the camera ean cecord, which is data sbour the dara, or mead, A—Only the losses compression technique ‘will allow the origin! uncomprested photo to be restored, (C—Dita mining identifies porters and correla: sions among the dara This will sow similarities bbeoseen songs to ag them 2 “lke” ochers with ‘comparable patterns for future selection, 19. A—Projcts that ae good for citizen scents ‘would be one where specialned equipment, such as 2 telescope or fish Rnder, would not be ‘required and ean be based on facts versus pe- sonal opinion. Counting tees would be the best ‘ue inthis example, 20, B—Cleaning involves finding and either cor- recting or eliminating incomplete records. Ie slko involves standardizing the data for the analysis to be performed. It could include emoving some complete and :orrece data that Is not needed forthe planned analysis. 21, B—The survey resuls wllshowiirudenss changed thei mind in ether diecton ot minained thee iewpoine about computer selene if they fle the teacher communicated efectvely and i thy fl they gine their bes foe wil not show i dents plan ro mor in compute sence, (C—The data in the table shows chat drivers in the 26-50 age bracker have the last number of accidents. The data cannot ell us when the drivers had an aeciden. 25, D—Analyzing big daa can identify risk Factors forall the issues excepe knowing exactly what ‘consumers wil purchase and when, 24, A—Sialler dara ses may not have enough data to Identify pattems or true tends. Ifa tend is noticed ina smaller data set. procesing big data may not be necessary. Ie wil no identify ‘metadata issues, nor determine when hardware purchases should be made, 25. BThe World Wide Web ian application that uses HTTP to share documents, videos, images, and other files among deviee connected 10 the Tnvernet 26, A—The redundancy designed ito the Internet ‘means dara can be sent via dierent paths 10 reach its destination, 27. C—The domain levels go frm the Top-Level Domain (edu) to the let. Anyplace is the 2 level, anyway isthe 3° level, anc snytime ithe 4 level 184. > STEPS. Build Your Test Taking Confidence 28, Bandwidth mesures the amount of data that can be transmitted in specific amount of, ‘ime, Therefore, knoveng how much data needs ta be downloaded on a regular basis is 2 key measurement a8 people generally dowaload far sore chen they ups 29, C—Cerificate Authors, oF CAs, isue dial cerieates to customers that confirm owner ‘hip of heir encrypecd Keys with secure Internet communications. This enables us to have online shoppingamong other secure online transactions. 30. C—A Distibuted Denial of Service attack ods sie wich invalid requests, causing i to bbe unable to respond to legitimate requests 31. A~Ensutng che security of your data is out of, ‘your control when you store i inthe loud. 32. A—The new name mus be registered with 2 [DNS site so the IP address will be associated With the new name and the ste can be Found. Your Internet Service Provider (ISP) can help with chis or you can register it youre. 33, D—Packes are created atthe sending end of the wansmistion and reasembled at the final destination, 34, CTC? cars packesand pases conto ofthe 10 IP whic routes chm to chee fil destination, "TCP then resembles che packes co dsp 35. B-Companies char tke advantage of dats min ing can provide information that a majority of thelr customers want rose on thei website, This Ina benefice che company and the consumer: 36. C—The ens in sharing digital fle withoue the arti’ permission is an ongoing concern in the music indusry. 37. A—To protec intlleceual property, the Digital Millennium Copyright Act (DMCA) works to prevent illegal fle sharing, illegal movie and music downloads, and licensing violations Peer-to-peer necworks ae ofen sed to legally sha les of all sypes, 38, D—One of many benef is chat all businesses can access the daca, making Ic ewsier for new business to have and analyze dat the eab- lished businesses se 39. BThis ie che only aptton sha wil apse the smallest number in als. 40, B—The data must be sored fora binary seach towork 41, C—Booleans can only be tue or fils, and C is the only option charean evaluate ro true o fe 42, A—The flow of procedures called indicate fame is being played. The procedure names and paramecers ae all correc 43, D—You cannor have an ELSE saement with- cout an TF statement. 44, BThe fist algorithm sort by mame, but then uses a binary search using phone number “This may not return correct results. Therefore, option Il using a linear search on a contact list sorted by area code wil return the correc els and is more effective. 45. C—A heasitic is finding the bes approximate elution when che actual solution is ineacable ‘A computer checking all posible chess moves, will slow the procesing down, so 4 heuristic solution will improve the speed and the overall game experience forthe player 46. B—teraion means “epeatng” 0 a loop will epeat unis condition ie met causing ito end 47. C—Since place is 5, the length ofthe snacks lis, ssacklplce] fers to dhe element ac the 5* pos tion ofthe lis, whichis "grape. Lis elemens ‘an be accesed using a constant, sich as i(2] or avaible as in this example, list{lace) 48, A—Block 1 produces correct results bused on the remperarue. Block 2 counts all empera- ‘ures < 80 to be a perfectDay, rather than sepa ‘ating them by temperature. The IF condition is se up incorrectly, 49. 31. 53. 55. 57. 59. AP Computer Science Principles: Practice Exam 1 ¢ 155: (C—Incracable algorithms do nor run efficiently 61. for large daa ses. DBlock-based languages ate the closest co natural language and are the most abstract. Texe-based language is nexe as itis also easy to ‘ead and use. Next is asembly language, which {sles abstract and closer to machin language. Machine language is the least abstract and the hhardea for people to work with, ‘€—Scleton criteria filter data and only proces those records that meet the cera, 62, 6. 6. DA causes any grade higher than 59 10 be asigned the fewer grade. B uses greater chan ‘ater chan less than. C wil be off by ane. Dis ‘D—Only option D ends up in the correct block facing in the cores drecsion. Remember that ROTATE commands do not move the robot fo- ward 2 block. They only change the direction in ‘the curren block the robot ii, B—An API (Applicaon Programming Inter face) connects software modules making working. rograms available for use in other program. B_Follow the order of operations ro determine the answer che code wil return, B—MOD aaleulaions provide the remainder when the ewo numbers ae divided. A—An OR condition only nceds one ofthe con- Aiions ro be true for the overall condition to be true. ince 10 is ess than 15, che value of «will be dgpayed. ‘B—Block | calculates the total ofthe ls indices. Block 2caleulaes the sum ofthe elements ofthe lis, 70. n. ‘B—Code inside the loop will never run because 10 > 5 before the loop runs the firs time. D—Esch time the value in che lise 16 not “banana” the word "banana" is appended tothe nd ofthe li, B—Apples is in the 4% positon in the lst snacks] = apples. ‘A—The value at snacks] is replaced by number Ui#4] which s 5, then 6, then 7, chen 8 as jer ates through che values 1-4, B—The plus + sign when used with text feds concatenate: or gis thera together. ‘A—None of the other aprons wil produce bet- ter code or xen code that works, ‘B_Programs developed for personal use do not have ohave the same level of esting a ape that will handle sensive transactions such a= mon- ‘exary ones or code chat will be widely distrbuced. - A~This option is correct. The arrow isin the 7. 6. ‘correct square and facing inthe correct direction, 'B, D—Clout-based sorage can be acesed from any location with an Interne connection, and is 8 good soluion for storage when local storage ‘options ae limited. Sensitive data should not be stored in the cloud © Du aggregation is not done accurately, ‘other date could be used in combination with ‘the tril data and availabe public information to identify parspants, 1 C, D=A cam with diverse shile and back: grounds can provide different viewpoints chat can result in a bener produce in a collaborative A, D—TCP makes the packets and puts chem back cogethe: wile IP sends them across the Incees B, C—Public key encryprion crests such long keys that brane force techniques ate ineffective ‘The keys ae asymmetric meaning different keys a used eo ererype and decrypt the data. A, BA bic can only hold owo poste values, O and 1, Therefore, any data ic holds can only be represented by these evo value. Any number 156 > STEPS. Bld Your Test-Taking Confidence MOD 2 will produce 0 or 1 nd Boolean values ane ether true or fae 73: Ay D—Sending wanssction data offsite can present a security concem if che data is not encrypted. Public key encryption is unbreakable ac this poine in time, so privacy issues would rot be & concer, Companies should tes cheir 7m isc recovery plan by periodically bringing: data back on-site to run on existing equipment Compression issues could sso occur a the dat may be woo large to send whout it A, B—Both anynchronow: and synchronous ‘communication processes us the “loud” orser= cs located remotely to enable communication.

You might also like