Python Quiz -6 Summer internship

Python Quiz -6 Summer internship

University

10 Qs

quiz-placeholder

Similar activities

GKA2043 Quiz 1

GKA2043 Quiz 1

University

10 Qs

Emotions? Related to mental health?

Emotions? Related to mental health?

1st Grade - Professional Development

15 Qs

Training External

Training External

University

15 Qs

EVALUACIÓN MEDICAMENTOS RESTRINGIDOS Y CONCILIACIÓN MEDICAME

EVALUACIÓN MEDICAMENTOS RESTRINGIDOS Y CONCILIACIÓN MEDICAME

University

10 Qs

Pertolongan Pertama Kecelakaan Kerja Quiz 1

Pertolongan Pertama Kecelakaan Kerja Quiz 1

1st Grade - University

10 Qs

Session 3

Session 3

University

13 Qs

PC-MAÑANERA-RM-01

PC-MAÑANERA-RM-01

University

10 Qs

Macro Economics 19.1 - 19.2

Macro Economics 19.1 - 19.2

University

14 Qs

Python Quiz -6 Summer internship

Python Quiz -6 Summer internship

Assessment

Quiz

Other

University

Practice Problem

Easy

Created by

Gnaneshwar Reddy

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following statements correctly defines a function in Python?

  • a) function myFunction()

  • b) def myFunction:

  • c) def myFunction():

  • d) define myFunction()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What is the output of the following code?

    def add(a, b):

    1. return a + b print(add(2, 3))

  • a) 2

  • b) 3

  • c) 5

  • d) None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. How do you call a function named myFunction in Python?

  • a) call myFunction

  • b) myFunction()

  • c) execute myFunction

  • d) myFunction

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

    • Which of the following lists is a valid Python list?

  • a) (1, 2, 3)

  • b) {1, 2, 3}

  • c) [1, 2, 3]

  • d) 1, 2, 3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What will be the output of the following code?

    my_list = [1, 2, 3, 4]

    print(my_list[2])

  • a) 1

  • b) 2

  • c) 3

  • d) 4

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. How do you append an item to a list in Python?

  • a) list.add(item)

  • b) list.append(item)

  • c) list.insert(item)

  • d) list.appendList(item)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What will be the output of the following code?

    def multiply_list(lst):

  2. result = 1

    1. for num in lst:

  3. result *= num

  4. return result

  5. my_list = [1, 2, 3, 4]

    1. print(multiply_list(my_list))

  • a) 10

  • b) 24

  • c) 12

  • d) None

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?