Python and SQL Quiz

Python and SQL Quiz

University

18 Qs

quiz-placeholder

Similar activities

Chapter 16 (UNIX II)

Chapter 16 (UNIX II)

University

15 Qs

Discrete Structure 2 Semi-Final Examination

Discrete Structure 2 Semi-Final Examination

University

15 Qs

R-Matey -- Exam #2 Review

R-Matey -- Exam #2 Review

University

21 Qs

EXCEL TEST

EXCEL TEST

KG - University

23 Qs

Web Scraping 102 - Quiz 2

Web Scraping 102 - Quiz 2

University

15 Qs

Quicksort. Hash Tables, and Binary Search Trees

Quicksort. Hash Tables, and Binary Search Trees

University

18 Qs

Round 1 (Tech Utsav)

Round 1 (Tech Utsav)

University

15 Qs

PYTHON-QUIZ-2023

PYTHON-QUIZ-2023

University

17 Qs

Python and SQL Quiz

Python and SQL Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Shubham Mishra

Used 8+ times

FREE Resource

18 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

State True or False: The Python interpreter handles logical errors during code execution.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the output of the following code snippet: text = "PYTHONPROGRAM" text=text.replace('PY','#') print(text)

#THONPROGRAM

##THON#ROGRAM

#THON#ROGRAM

#YTHON#ROGRAM

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following expressions evaluates to False?

not(True) and False

True or False

not(False and True)

True and not(False)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the expression? str='International' print(str.split("n"))

('I', 'ter', 'atio', 'al')

['I', 'ter', 'atio', 'al']

['I', 'n', 'ter', 'n', 'atio', 'n', 'al']

Error

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What will be the output of the following code snippet? str= "World Peace" print(str[-2::-2])

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? tuple1 = (1, 2, 3) tuple2 = tuple1 tuple1 += (4,) print(tuple1 == tuple2)

True

False

tuple1

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If my_dict is a dictionary as defined below, then which of the following statements will raise an exception? my_dict = {'apple': 10, 'banana': 20, 'orange': 30}

my_dict.get('orange')

print(my_dict['apple', 'banana'])

my_dict['apple']=20

print(str(my_dict))

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?