Computer Science Unit 2 EXAM With Answers [100% PASS]
Computer Science Unit 2 EXAM With Answers [100% PASS] In the following function printThreeTimes: function printThreeTimes(word){ println(word); println(word); println(word); } What is the parameter of the function? *Ans* word What is the proper function to call to print to the screen? *Ans* println What keyword do you need to use to define a variable in JavaScript? *Ans* var To ask the user of the program for a number, which function should you use? *Ans* Both readInt and readFloat are for numbers. What function do you need to call to ask the user of the program to enter text? *Ans* readLine What will the following code print to the screen? println(2 + 2); *Ans* 4 What symbol do you use to do division in JavaScript? *Ans* / What symbol do you use to do multiplication in JavaScript? *Ans* * What function do you need to call to get the width of the screen? *Ans* getWidth() In the following code, we create a circle and add it to the screen. What is the meaning of the x variable? var x = 20; var circle = new Circle(x); add(circle); *Ans* The radius of the circle What are the coordinates of the top right corner of the screen? *Ans* getWidth(), 0 Which of the following is not a valid value for a boolean? *Ans* yes What symbol represents the and operator in JavaScript? *Ans* &&
Escuela, estudio y materia
- Institución
- Graduation in computer science
- Grado
- Graduation in computer science
Información del documento
- Subido en
- 5 de abril de 2024
- Número de páginas
- 21
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
computer science unit 2 exam with answers 100 p