python basic 1

python basic 1

University

15 Qs

quiz-placeholder

Similar activities

Python Control Statements

Python Control Statements

University

10 Qs

CIS1101-programming practice

CIS1101-programming practice

University

15 Qs

Methods

Methods

University

10 Qs

Python for beginners

Python for beginners

University

20 Qs

Python Basics Quiz 1

Python Basics Quiz 1

8th Grade - University

15 Qs

Introduction To Python

Introduction To Python

University

20 Qs

csharp

csharp

University

10 Qs

PRG1 day 1 review of programming concepts

PRG1 day 1 review of programming concepts

University

10 Qs

python basic 1

python basic 1

Assessment

Quiz

Computers

University

Hard

Created by

Vengadapathiraj M

Used 4+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the proper syntax to check if a particular element is present in a list?

if ele in list

if not ele not in list

Both A & B

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

Five neither thrive three

Five neither three thrive

three three three three

Five neither Five neither

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

def check(a):

print("Even" if a % 2 == 0 else "Odd")

check(12)

Even

Odd

Error

None

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

example = ["Sunday", "Monday", "Tuesday", "Wednesday"];

print(example[-3:-1])

['Sunday', 'Monday']

['Sunday', 'Tuesday']

['Monday', 'Tuesday']

['Wednesday', 'Monday']

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

a = [1, 2]

print(a * 3)

Error

[1, 2]

[1, 2, 1, 2]

[1, 2, 1, 2, 1, 2]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

example = ["Sunday", "Monday", "Tuesday", "Wednesday"];

del example[2]

print(example)

['Sunday', 'Monday', 'Wednesday']

['Monday', 'Tuesday', 'Wednesday']

['Sunday', 'Monday', 'Tuesday', 'Wednesday']

['Sunday', 'Monday', 'Tuesday']

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the type of the variable sorted_numbers in the below code snippet?

numbers = (4, 7, 19, 2, 89, 45, 72, 22)

sorted_numbers = sorted(numbers)

print(sorted_numbers)

List

Tuple

String

Int

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?