PE1 -- Module 2 Quiz

Descripción

PE1 -- Module 2 Quiz
David Khieu
Test por David Khieu, actualizado hace más de 1 año
David Khieu
Creado por David Khieu hace más de 1 año
104
0

Resumen del Recurso

Pregunta 1

Pregunta
The escape character owes its name to the fact that it?
Respuesta
  • 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

Pregunta 2

Pregunta
The meaning of the positional parameter is determined by its:
Respuesta
  • position
  • appearance
  • name

Pregunta 3

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

Pregunta 4

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

Pregunta 5

Pregunta
The // operator:
Respuesta
  • performs integer division
  • performs regular division
  • does not exist

Pregunta 6

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

Pregunta 7

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

Pregunta 8

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

Pregunta 9

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

Pregunta 10

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

Pregunta 11

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

Pregunta 12

Pregunta
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)
Respuesta
  • 4.0
  • 2.0
  • this code will cause a runtime error
  • 8.0

Pregunta 13

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

Pregunta 14

Pregunta
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)
Respuesta
  • 2
  • 24
  • 4
  • 6

Pregunta 15

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

Pregunta 16

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

Pregunta 17

Pregunta
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)
Respuesta
  • 4
  • 3
  • 2
  • 1

Pregunta 18

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

Pregunta 19

Pregunta
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)
Respuesta
  • 666
  • 18
  • 36
  • 333333

Pregunta 20

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

Pregunta 21

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

Pregunta 22

Pregunta
The ** operator:
Respuesta
  • performs exponentiation
  • does not exist
  • performs floating-point multiplication
  • performs duplicated multiplication

Pregunta 23

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

Pregunta 24

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

Pregunta 25

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

Pregunta 26

Pregunta
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)
Respuesta
  • 24
  • 4
  • 2
  • 6

Pregunta 27

Pregunta
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)
Respuesta
  • 2.0
  • 4.0
  • the code will cause a runtime error
  • 8.0

Pregunta 28

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

Pregunta 29

Pregunta
Which of the following statements are true? (Select two answers)
Respuesta
  • 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.

Pregunta 30

Pregunta
Which of the following variable names are illegal? (Select two answers)
Respuesta
  • True
  • and
  • TRUE
  • true
Mostrar resumen completo Ocultar resumen completo

Similar

PROCESADORES DE TEXTO
rm-asociados
Primera Guerra Mundial.
Oswaldo Martinez
TEORÍA DE LA PERSONALIDAD según Freud
Erika Alexandra 1467
Statistics Equations
maya velasquez
ARISTÓTELES
maya velasquez
Diferencias entre la Química y Física
maya velasquez
CARACTERÍSTICAS LINGÜÍSTICAS DE LOS TEXTOS ARGUMENTATIVOS
Judith Celma Muñoz
Linea del tiempo Ciencia
erick romero
La diversidad y el juego
nicolesanchezand
MAPA LITERATURA PRECOLOMBINA
Sharit Romero Bolaño
Herencia Genética básica
Catalina Ramos