[ AEEP2301 ] Module 2 - Data Types, Variables, Literals, Operators

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:08 PM on 9/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

C

The \n digraph forces the print() function to:

A. Stop its execution

B. Duplicate the character next to the digraph

C. Break the output line

D. Output exactly two characters: \ and n

2
New cards

A

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. 8.0

B. The code will cause a runtime error

C. 4.0

D. 2.0

3
New cards

C

What is the output of the following snippet?

z = y = x = 1

print(x, y, z, sep='*')


A. 1 1 1

B. x*y*z

C. 1*1*1

D. 1 x y z

4
New cards

C

What is the output of the following snippet?

x = 1 / 2 + 3 // 3 + 4 ** 2

print(x)


A. 8.5

B. 0

C. 17.5

D. 17

5
New cards

D

What is the output of the following snippet if the user enters 2 and 4 respectively?

x = int(input())

y = int(input())

print(x + y)


A. 2

B. 24

C. 4

D. 6

6
New cards

B and D

Which of the following variable names are illegal? (Select two answers)

A. true

B. and

C. TRUE

D. True

7
New cards

A

The result of the following division:

1 / 1


A. Equal to 1.0

B. Equal to 1

C. Cannot be evaluated

D. Cannot be predicted

8
New cards

C

The ** operator:

A. Does not exist

B. Performs duplicated multiplication

C. Performs exponentiation

D. Performs floating-point multiplication

9
New cards

A

What is the output of the following snippet?

y = 2 + 3 * 5

print(Y)


A. The snippet will cause an execution error

B. 25

C. 17

D. 17.0

10
New cards

D

What is the output of the following snippet?

x = 1

y = 2

z = x

x = y

y = z

print(x, y)


A. 1 2

B. 1 1

C. 2 2

D. 2 1

11
New cards

D

The value twenty point twelve times ten raised to the power of eight should be written as:

A. 20.12*10^8

B. 20E12.8

C. 20.12E8.0

D. 20.12E8

12
New cards

A

What is the output of the following snippet if the user enters 2 and 4 respectively?

x = int(input())

y = int(input())

x = x // y

y = y // x

print(y)


A. The code will cause a runtime error

B. 2.0

C. 8.0

D. 4.0

13
New cards

D

What is the output of the following snippet if the user enters 11 and 4 respectively?

x = int(input())

y = int(input())

x = x % y

x = x % y

y = y % x

print(y)


A. 3

B. 2

C. 4

D. 1

14
New cards

B

The print() function can output values of:

A. Not more than five arguments

B. Any number of arguments, including zero

C. Any number of arguments, excluding zero

D. Just one argument

15
New cards

A

What is the output of the following snippet if the user enters 3 and 6 respectively?

x = input()

y = int(input())

print(x * y)


A. 333333

B. 36

C. 18

D. 666

16
New cards

B

Left-sided binding determines that the result of the following expression:

1 // 2 * 3

is equal to:


A. 0.0

B. 0

C. 4.5

D. 0.166666666666666666

17
New cards

B and D

Which of the following statements are true? (Select two answers)

A. The result of the / operator is always an integer value.

B. The ** operator uses right-sided binding.

C. Adding precedes multiplication.

D. The right argument of the % operator cannot be zero.

18
New cards

D

What is the output of the following snippet if the user enters 2 and 4 respectively?

x = input()

y = input()

print(x + y)


A. 4

B. 2

C. 6

D. 24

19
New cards

B

The meaning of a keyword parameter is determined by:

A. Its value

B. The argument's name specified along with its value

C. Its connection with existing variables

D. Its position within the argument list

20
New cards

D

The 0o prefix means that the number after it is denoted as:

A. Hexadecimal

B. Decimal

C. Binary

D. Octal