PE1 -- Module 2 Quiz

Description

PE1 -- Module 2 Quiz
David Khieu
Quiz by David Khieu, updated more than 1 year ago
David Khieu
Created by David Khieu over 1 year ago
101
0

Resource summary

Question 1

Question
The escape character owes its name to the fact that it?
Answer
  • changes the meaning of the character next to it.
  • escapes from source files into the computer memory
  • cannot be caught due to its high speed

Question 2

Question
The meaning of the positional parameter is determined by its:
Answer
  • position
  • appearance
  • name

Question 3

Question
The most important difference between integer and floating-point numbers lies in the fact that:
Answer
  • they are stored differently in the computer memory
  • integers cannot be literals, while floats can
  • they cannot be used simultaneously

Question 4

Question
The 0x prefix means that the number after it is denoted as:
Answer
  • a decimal
  • an octal
  • a hexadecimal

Question 5

Question
The // operator:
Answer
  • performs integer division
  • performs regular division
  • does not exist

Question 6

Question
The result of the following addition: 123 + 0.0
Answer
  • is equal to 123
  • is equal to 123.0
  • cannot be evaluated

Question 7

Question
Right-sided binding means that the following expression: 1 ** 2 ** 3
Answer
  • from right to left
  • from left to right
  • in random order

Question 8

Question
A keyword is a word that: (Select two answers)
Answer
  • is the most important word in the whole program
  • cannot be used as a variable name
  • cannot be used as a function name

Question 9

Question
A value returned by the input() function is
Answer
  • a string
  • an integer
  • a float

Question 10

Question
Only which one of the following statements is true - which one?
Answer
  • multiplication precedes addition
  • addition precedes multiplication
  • neither statement can be evaluated

Question 11

Question
What is the output of the following snippet? y = 2 + 3 * 5 print (Y)
Answer
  • 17.0
  • 25.
  • 17
  • This snippet will cause an execution error

Question 12

Question
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively? x = int(input()) y = int(input()) x = x // y y = y // x print (y)
Answer
  • 4.0
  • 2.0
  • this code will cause a runtime error
  • 8.0

Question 13

Question
What is the output of the following snippet? x = 1 / 2 + 3 // 3 + 4 ** 2 print (x)
Answer
  • 17.5
  • 17
  • 8.5
  • 8

Question 14

Question
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively? x = input() y = input() print (x + y)
Answer
  • 2
  • 24
  • 4
  • 6

Question 15

Question
The 0o prefix means that the number after it is denoted as:
Answer
  • binary
  • hexadecimal
  • octal
  • decimal

Question 16

Question
What is the output of the following snippet? x = 1 y = 2 z = x x = y y = z print (x, y)
Answer
  • 2 1
  • 1 2
  • 1 1
  • 2 2

Question 17

Question
What is the output of the following snippet if the user enters two lines containing 11 and 4 respectively? x =int(input()) y = int(input()) x = x % y x = x % y y = y % x print (y)
Answer
  • 4
  • 3
  • 2
  • 1

Question 18

Question
What is the output of the following snippet? z = y = x = 1 print (x, y , z, sep='*')
Answer
  • 1 1 1
  • x*y*z
  • x y z
  • 1*1*1

Question 19

Question
What is the output of the following snippet if the user enters two lines containing 3 and 6 respectively x = input () y = int (input ()) print (x * y)
Answer
  • 666
  • 18
  • 36
  • 333333

Question 20

Question
The print() function can output values of:
Answer
  • just one argument
  • any number of arguments (including zero)
  • not more than five arguments
  • any number of arguments (excluding zero)

Question 21

Question
The value twenty point twelve times ten raised to the power of eight should be written as:
Answer
  • 20.12E8
  • 20E12.8
  • 20.12*10^8
  • 20.12E8.0

Question 22

Question
The ** operator:
Answer
  • performs exponentiation
  • does not exist
  • performs floating-point multiplication
  • performs duplicated multiplication

Question 23

Question
The result of the following division: 1 / 1
Answer
  • is equal to 1
  • cannot be evaluated
  • is equal to 1.0
  • cannot be predicted

Question 24

Question
The \n digraph forces the print () function to
Answer
  • break the output line
  • output exactly two characters: \ and n
  • duplicate the character next to the digraph
  • stop its execution

Question 25

Question
The meaning of keyword parameter is determined by:
Answer
  • the argument's name specified along with its value
  • its connection with existing variables
  • its position within the argument list
  • its value

Question 26

Question
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively? x = int (input()) y = int(input()) print( x + Y)
Answer
  • 24
  • 4
  • 2
  • 6

Question 27

Question
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively? x= int(input()) y= int(input()) x = x / y y = y / x print (y)
Answer
  • 2.0
  • 4.0
  • the code will cause a runtime error
  • 8.0

Question 28

Question
Left-sided binding determines that the result of the following expression: 1 // 2 * 3 is equal to:
Answer
  • 0.166666666666666666
  • 0
  • 0.0
  • 4.5

Question 29

Question
Which of the following statements are true? (Select two answers)
Answer
  • Addition precedes multiplication
  • The result of the / operator is always an integer value.
  • The right argument of the % operator cannot be zero
  • The ** operator uses right-sided binding.

Question 30

Question
Which of the following variable names are illegal? (Select two answers)
Answer
  • True
  • and
  • TRUE
  • true
Show full summary Hide full summary

Similar

Spanish Vocabulary- Intermediate
PatrickNoonan
The Skeletal System - PE GCSE EdExcel
naomisargent
Biology AQA 3.1.5 The Biological basis of Heart Disease
evie.daines
GCSE Biology AQA
isabellabeaumont
Prueba de Aptitud Académica - Lenguaje
Teresa Nadal
Macbeth Notes
Bella Ffion Martin
Basic English tenses
Mariola Hejduk
Plant Anatomy Quiz
Kit Sinclair
Leaving Certificate Japanese Kanji
Sarah Egan
Introduction to the Atom
Derek Cumberbatch
GoConqr Guide to Flowcharts for Business
Sarah Egan