Quiz 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

C) the code will cause a runtime error

*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)* A) 2.0 B) 4.0 C) the code will cause a runtime error D) 8.0

C) True

*One of the following variables' names is illegal -* *which one?* A) true B) TRUE C) True D) tRUE

C) the result of the / operator is always an integer value

*Only one of the following statements is false - which one?* A) multiplication precedes addition B) the ** operator uses right sided binding C) the result of the / operator is always an integer value D) the right argument of the % operator cannot be zero

C) performs exponentiation

*The **** operator:* A) performs floating-point multiplication B) performs duplicated multiplication C) performs exponentiation D) does not exist

B) octal

*The 0o prefix means that the number after it is denoted as:* A) decimal B) octal C) hexadecimal D) binary

C) break the output line

*The \n digraph forces the print() function to:* A) duplicate the character next to the digraph B) stop its execution C) break the output line D) output exactly two characters: \ and n

D) the argument's name specified along with its value

*The meaning of the keyword parameter is determined by:* A) its connection with existing variables B) its position within the argument list C) its value D) the argument's name specified along with its value

C) any number of arguments (including zero)

*The print() function can output values of:* A) just one argument B) not more than five arguments C) any number of arguments (including zero) D) any number of arguments (excluding zero)

C) is equal to 1.0

*The result of the following division:* *1 / 1* A) is equal to 1 B) cannot be predicted C) is equal to 1.0 D) cannot be evaluated

A) 8.0

*What is the output of the following piece of code* *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)* A) 8.0 B) the code will cause a runtime error C) 2.0 D) 4.0

C) 17.5

*What is the output of the following snippet?* *x = 1 / 2 + 3 // 3 + 4 **** 2* *print(x)* A) 8.5 B) 17 C) 17.5 D) 8

D) 2 1

*What is the output of the following snippet?* *x=1* *y=2* *z=x* *x=y* *y=z* *print(x,y)* A) 1 1 B) 2 2 C) 1 2 D) 2 1

D) the snippet will cause an execution error

*What is the output of the following snippet?* *x = 2 + 3 *** 5.* *print(X)* A) 25.0 B) 17.0 C) 17 D) the snippet will cause an execution error

B) 1 ** 1 ** 1

*What is the output of the following snippet?* *z = y = x = 1* *print(x,y,z,sep='***')* A) 1 1 1 B) 1 ** 1 ** 1 C) x ** y ** z D) x y z

C) 20.12E8

*The value twenty point twelve times ten raised to the power of eight should be written as:* A) 20.12*10^8 B) 20.12E8.0 C) 20.12E8 D) 20E12.8

C) 0

*Left‑sided binding determines that the result of* *the following expression* *1 // 2 *** 3* A) 4.5 B) 0.0 C) 0 D) 0.16666666666666666

D) 1

*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)* A) 2 B) 3 C) 4 D) 1

A) 24

*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)* A) 24 B) 6 C) 2 D) 4

C) 6

*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)* A) 24 B) 2 C) 6 D) 4

C) 333333

*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)* A) 36 B) 18 C) 333333 D) 666


Set pelajaran terkait

Domestic, Foreign and Alien Insurers

View Set

CH 21: Complications Occurring Before Labor & Delivery

View Set

Anatomy and physiology- 7.3- Bone development

View Set

Priority-Setting Frameworks, Infection Control and Isolation, Health Care Delivery, ATI - Nursing Foundations Test

View Set

LabCE Modules - Microbiology Microbial Identification Using MALDI-TOF MS

View Set