Docsity

CODEHS final exam QUESTIONS WITH ANSWERS, Exams of Computer Science

Toggle sidebar
bg1
CODEHS |\final |\exam |\QUESTIONS |\
WITH |\ANSWERS
A |\store |\has |\20 |\apples |\in |\its |\inventory. |\How |\can |\you |\store |\
this |\information |\in |\a |\JavaScript |\variable? |\- |\CORRECT |\
ANSWERS |\✔✔var |\numApples |\= |\20;
You |\want |\to |\read |\input |\from |\the |\user |\to |\know |\how |\many |\
apples |\they |\would |\like |\to |\buy. |\Which |\statement |\should |\
you |\use |\to |\read |\in |\a |\number |\from |\the |\user? |\- |\CORRECT |\
ANSWERS |\✔✔var |\applesToBuy |\= |\readInt("How |\many |\
apples |\would |\you |\like? |\");
In |\a |\graphics |\canvas, |\what |\are |\the |\coordinates |\of |\the |\
bottom |\right |\corner |\of |\the |\window? |\- |\CORRECT |\ANSWERS |\
✔✔getWidth(), |\getHeight()
You |\are |\splitting |\up |\all |\of |\your |\apples |\equally |\between |\3 |\
people. |\Which |\statement |\below |\will |\calculate |\how |\many |\
apples |\will |\be |\left |\over? |\- |\CORRECT |\ANSWERS |\✔✔var |\
leftOver |\= |\numApples |\% |\3;
What |\are |\the |\coordinates |\of |\the |\center |\of |\the |\window? |\- |\
CORRECT |\ANSWERS |\✔✔getWidth() |\/ |\2, |\getHeight() |\/ |\2
pf3
pf4
pf5
pf8

Partial preview of the text

Download CODEHS final exam QUESTIONS WITH ANSWERS and more Exams Computer Science in PDF only on Docsity!

CODEHS |\final |\exam |\QUESTIONS |\

WITH |\ANSWERS

A |\store |\has |\ 20 |\apples |\in |\its |\inventory. |\How |\can |\you |\store | this |\information |\in |\a |\JavaScript |\variable? |- |\CORRECT | ANSWERS |\✔✔var |\numApples |= |\20; You |\want |\to |\read |\input |\from |\the |\user |\to |\know |\how |\many | apples |\they |\would |\like |\to |\buy. |\Which |\statement |\should | you |\use |\to |\read |\in |\a |\number |\from |\the |\user? |- |\CORRECT | ANSWERS |\✔✔var |\applesToBuy |= |\readInt("How |\many | apples |\would |\you |\like? |"); In |\a |\graphics |\canvas, |\what |\are |\the |\coordinates |\of |\the | bottom |\right |\corner |\of |\the |\window? |- |\CORRECT |\ANSWERS | ✔✔getWidth(), |\getHeight() You |\are |\splitting |\up |\all |\of |\your |\apples |\equally |\between |\ 3 | people. |\Which |\statement |\below |\will |\calculate |\how |\many | apples |\will |\be |\left |\over? |- |\CORRECT |\ANSWERS |\✔✔var | leftOver |= |\numApples |% |\3; What |\are |\the |\coordinates |\of |\the |\center |\of |\the |\window? |- | CORRECT |\ANSWERS |\✔✔getWidth() |/ |\2, |\getHeight() |/ |\ 2

Which |\of |\the |\following |\choices |\is |\a |\properly |\formed | JavaScript |\variable |\name, |\meaning |\it |\is |\both |\legal |\in |\the | JavaScript |\language |\and |\considered |\good |\style |- | CORRECT |\ANSWERS |\✔✔userAge Who/What |\is |\Karel? |- |\CORRECT |\ANSWERS |\✔✔Karel |\is |\a | dog What |\DOES |\NOT |\belong |\in |\the |\start |\function? |- |\CORRECT | ANSWERS |\✔✔Function |\definition Which |\of |\these |\is |\a |\valid |\Karel |\command? |- |\CORRECT | ANSWERS |\✔✔move() Which |\of |\these |\commands |\does |\Karel |\NOT |\know? |- | CORRECT |\ANSWERS |\✔✔turnCircle(); What |\commands |\does |\Super |\Karel |\know |\that |\regular |\Karel |\does |\not? |- |\CORRECT |\ANSWERS |\✔✔turnAround( |) |\and | turnRight( |) Abstraction |\is |... |- |\CORRECT |\ANSWERS |\✔✔All |\of |\the |\above

How |\can |\we |\teach |\Karel |\new |\commands? |- |\CORRECT | ANSWERS |\✔✔Define |\a |\new |\function What |\keyword |\do |\you |\need |\to |\use |\to |\define |\a |\variable |\in | JavaScript? |- |\CORRECT |\ANSWERS |\✔✔var To |\add |\a |\rectangle |\named |\rect |\to |\the |\screen, |\which | command |\do |\you |\need |\to |\give? |* |- |\CORRECT |\ANSWERS | ✔✔add(rect) Which |\of |\these |\are |\true |\about |\RGB? |- |\CORRECT |\ANSWERS |\✔✔R= |\Red, |\G= |\Green, |\B=Blue What |\is |\the |\RGB |\code |\for |\White? |- |\CORRECT |\ANSWERS | ✔✔255, |\255, |\ 255 What |\is |\the |\RGB |\code |\for |\Red? |- |\CORRECT |\ANSWERS | ✔✔255, |\0, |\ 0 Which |\STEM |\field |\is |\the |\only |\one |\to |\have |\more |\annual | jobs |\than |\graduates? |- |\CORRECT |\ANSWERS |\✔✔Computing What |\function |\do |\you |\need |\to |\call |\to |\get |\the |\height |\of |\the | screen? |- |\CORRECT |\ANSWERS |\✔✔getHeight();

What |\does |\HTML |\stand |\for? |- |\CORRECT |\ANSWERS | ✔✔Hypertext |\Markup |\Language What |\does |\URL |\stand |\for? |- |\CORRECT |\ANSWERS | ✔✔Uniform |\Resource |\Locator Which |\of |\the |\following |\is |\an |\example |\of |\metadata |\about |\a | webpage? |- |\CORRECT |\ANSWERS |\✔✔The |\title |\of |\the | webpage What |\is |\the |\correct |\tag |\for |\the |\largest |\heading? |- | CORRECT |\ANSWERS |\✔✔ What |\is |\the |\correct |\HTML |\tag |\for |\inserting |\a |\line |\break? |- | CORRECT |\ANSWERS |\✔✔ What |\is |\the |\preferred |\way |\for |\adding |\a |\background |\color | in |\HTML? |- |\CORRECT |\ANSWERS |\✔✔ Choose |\the |\correct |\HTML |\tag |\to |\make |\a |\text |\bold: |* |- | CORRECT |\ANSWERS |\✔✔

If |\I |\want |\to |\use |\the |\class |"header" |\as |\a |\selector |\in |\CSS, | how |\should |\I |\begin |\the |\rule? |- |\CORRECT |\ANSWERS | ✔✔#header |{ How |\do |\you |\add |\an |\image |\in |\HTML? |- |\CORRECT |\ANSWERS |\✔✔ What |\is |\the |\correct |\HTML |\for |\inserting |\an |\image? |- | CORRECT |\ANSWERS |\✔✔ What |\does |\CSS |\stand |\for? |- |\CORRECT |\ANSWERS | ✔✔Cascading |\Style |\Sheets For |\HTML |\tables, |\ |\means |\create |\a... |- |\CORRECT | ANSWERS |\✔✔TABLE |\HEADING For |\HTML |\tables, |\ |\means |\create |\a... |- |\CORRECT | ANSWERS |\✔✔TABLE |\DATA For |\HTML |\tables, |\ |\means |\create |\a... |- |\CORRECT | ANSWERS |\✔✔TABLE |\ROW

What |\is |\the |\correct |\HTML |\for |\inserting |\a |\background | image? |- |\CORRECT |\ANSWERS |\✔✔