PE1 -- Module 2 Quiz

Beschreibung

PE1 -- Module 2 Quiz
David Khieu
Quiz von David Khieu, aktualisiert more than 1 year ago
David Khieu
Erstellt von David Khieu vor mehr als ein Jahr
104
0

Zusammenfassung der Ressource

Frage 1

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

Frage 2

Frage
The meaning of the positional parameter is determined by its:
Antworten
  • position
  • appearance
  • name

Frage 3

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

Frage 4

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

Frage 5

Frage
The // operator:
Antworten
  • performs integer division
  • performs regular division
  • does not exist

Frage 6

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

Frage 7

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

Frage 8

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

Frage 9

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

Frage 10

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

Frage 11

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

Frage 12

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

Frage 13

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

Frage 14

Frage
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)
Antworten
  • 2
  • 24
  • 4
  • 6

Frage 15

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

Frage 16

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

Frage 17

Frage
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)
Antworten
  • 4
  • 3
  • 2
  • 1

Frage 18

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

Frage 19

Frage
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)
Antworten
  • 666
  • 18
  • 36
  • 333333

Frage 20

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

Frage 21

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

Frage 22

Frage
The ** operator:
Antworten
  • performs exponentiation
  • does not exist
  • performs floating-point multiplication
  • performs duplicated multiplication

Frage 23

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

Frage 24

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

Frage 25

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

Frage 26

Frage
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)
Antworten
  • 24
  • 4
  • 2
  • 6

Frage 27

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

Frage 28

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

Frage 29

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

Frage 30

Frage
Which of the following variable names are illegal? (Select two answers)
Antworten
  • True
  • and
  • TRUE
  • true
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Esperanto Basiswortschatz
JohannesK
Business Englisch
cathyc
L' offre - Phrases - Chapitre 3
Gaelle Bourgeois
Antike - Rom: Von der Republik zum Kaiserreich
Markus Grass
Kabale und Liebe - Umfangreiche Lernfolien
Laura Overhoff
working in a globalized wolrd
Alexandra Do
Buchführung
Sabrina Heckler
INNO Klausur 1
Inno 2015
Φαρμακολογία 1 Δ
Lampros Dimakopoulos
Vetie - Biochemie - Formelsammlung
Fioras Hu
Vetie - Tierzucht & Genetik - Fragen Übungen
Fioras Hu