COMP 1010 TEST 1

COMP 1010 TEST 1

University

40 Qs

quiz-placeholder

Similar activities

Python Exam Section 1

Python Exam Section 1

University

40 Qs

TECHTRIX2025 BUGHUNT FINALS

TECHTRIX2025 BUGHUNT FINALS

University

35 Qs

tổng hợp kiến thức React

tổng hợp kiến thức React

University

44 Qs

QUIZ - EXCEL

QUIZ - EXCEL

University

40 Qs

Basics of Python Programming

Basics of Python Programming

University

44 Qs

Lecture 2: Input and Output

Lecture 2: Input and Output

University

35 Qs

Clasificatoria POChE franja 1

Clasificatoria POChE franja 1

University

35 Qs

Komputer I Modul 1

Komputer I Modul 1

University

43 Qs

COMP 1010 TEST 1

COMP 1010 TEST 1

Assessment

Quiz

Other

University

Hard

Created by

kidus tedla

Used 2+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following line of code

x = 5 + 8.0

int

float

str

Python is loosely typed, so we don't know.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the results of the following calculations?

9//2          9/2

4 & 4

4 & 4.5

4.5 & 4

none of the above

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What value is stored in x after the following line of code?

x = (4 + 2*4 - 3**2)//2

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What value is stored in z after the following code is run?

x = 10

y = 5

z = x/y + x*y - x

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What value will b have after the following code is run?

a = 5

b = 8

a = b

b = a

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

An import statement:


makes a collection of functions and/or constants available to us to use in our code.

 

copies data from one variable into another variable.

loads data from a data file.

should be located at the top of our program.


asks the user to enter input, and pauses our program until the input is received.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How should the blank in the following line of code be filled to print

one plus two is three

?

print("_______________".format(first = "one", second = "two", answer = "three"))

{"one"} plus {"two"} is {"three"}

{one} plus {two} is {three}

{"first"} plus {"second"} is {"answer"}

{first} plus {second} is {answer}

{1} plus {2} is {3}

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?