PE1 -- Module 2 Quiz

Descrição

PE1 -- Module 2 Quiz
David Khieu
Quiz por David Khieu, atualizado more than 1 year ago
David Khieu
Criado por David Khieu mais de 1 ano atrás
104
0

Resumo de Recurso

Questão 1

Questão
The escape character owes its name to the fact that it?
Responda
  • 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

Questão 2

Questão
The meaning of the positional parameter is determined by its:
Responda
  • position
  • appearance
  • name

Questão 3

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

Questão 4

Questão
The 0x prefix means that the number after it is denoted as:
Responda
  • a decimal
  • an octal
  • a hexadecimal

Questão 5

Questão
The // operator:
Responda
  • performs integer division
  • performs regular division
  • does not exist

Questão 6

Questão
The result of the following addition: 123 + 0.0
Responda
  • is equal to 123
  • is equal to 123.0
  • cannot be evaluated

Questão 7

Questão
Right-sided binding means that the following expression: 1 ** 2 ** 3
Responda
  • from right to left
  • from left to right
  • in random order

Questão 8

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

Questão 9

Questão
A value returned by the input() function is
Responda
  • a string
  • an integer
  • a float

Questão 10

Questão
Only which one of the following statements is true - which one?
Responda
  • multiplication precedes addition
  • addition precedes multiplication
  • neither statement can be evaluated

Questão 11

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

Questão 12

Questão
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)
Responda
  • 4.0
  • 2.0
  • this code will cause a runtime error
  • 8.0

Questão 13

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

Questão 14

Questão
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)
Responda
  • 2
  • 24
  • 4
  • 6

Questão 15

Questão
The 0o prefix means that the number after it is denoted as:
Responda
  • binary
  • hexadecimal
  • octal
  • decimal

Questão 16

Questão
What is the output of the following snippet? x = 1 y = 2 z = x x = y y = z print (x, y)
Responda
  • 2 1
  • 1 2
  • 1 1
  • 2 2

Questão 17

Questão
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)
Responda
  • 4
  • 3
  • 2
  • 1

Questão 18

Questão
What is the output of the following snippet? z = y = x = 1 print (x, y , z, sep='*')
Responda
  • 1 1 1
  • x*y*z
  • x y z
  • 1*1*1

Questão 19

Questão
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)
Responda
  • 666
  • 18
  • 36
  • 333333

Questão 20

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

Questão 21

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

Questão 22

Questão
The ** operator:
Responda
  • performs exponentiation
  • does not exist
  • performs floating-point multiplication
  • performs duplicated multiplication

Questão 23

Questão
The result of the following division: 1 / 1
Responda
  • is equal to 1
  • cannot be evaluated
  • is equal to 1.0
  • cannot be predicted

Questão 24

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

Questão 25

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

Questão 26

Questão
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)
Responda
  • 24
  • 4
  • 2
  • 6

Questão 27

Questão
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)
Responda
  • 2.0
  • 4.0
  • the code will cause a runtime error
  • 8.0

Questão 28

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

Questão 29

Questão
Which of the following statements are true? (Select two answers)
Responda
  • 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.

Questão 30

Questão
Which of the following variable names are illegal? (Select two answers)
Responda
  • True
  • and
  • TRUE
  • true

Semelhante

Plano de Estudo - Semana 1
Alessandra S.
Aplicações do Mapa Mental
Alessandra S.
ÉTICA e CONCEITOS
Viviana Veloso
Phrasal Verbs - Inglês #5
Eduardo .
Phrasal Verbs - Inglês #9
Eduardo .
TRIBUTAÇÃO E ORÇAMENTO
Jualvesm
Teoria do Crime
Marianna Martins
FCE Opposites Practice
titaleoni
Passe Cursinho - Pré-Vestibular 2016
Passe Cursinho
Geografia - Problemas ambientais e outros
Catarina Araújo
Citologia
Thamy Procopio