Week 1

Week 1

Professional Development

12 Qs

quiz-placeholder

Similar activities

Tuan 4 - String

Tuan 4 - String

KG - Professional Development

10 Qs

codePannu  Level 1 Python Course - Week 5 Quiz on Conditional Operators

codePannu Level 1 Python Course - Week 5 Quiz on Conditional Operators

Professional Development

15 Qs

BBA ITM QUIZ FOR PROGRAMMING LANGUAGE

BBA ITM QUIZ FOR PROGRAMMING LANGUAGE

Professional Development

12 Qs

Python Training Day-2  Quiz-2

Python Training Day-2 Quiz-2

Professional Development

10 Qs

Sequences-2

Sequences-2

Professional Development

10 Qs

Python Libraries Series - Pandas

Python Libraries Series - Pandas

Professional Development

11 Qs

DevNet Express

DevNet Express

10th Grade - Professional Development

11 Qs

JSKBS - Database Management System

JSKBS - Database Management System

Professional Development

15 Qs

Week 1

Week 1

Assessment

Quiz

Computers

Professional Development

Medium

Created by

John Doe

Used 5+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

How do you comment some code in Python?

# Commented code

// Commented code

/* Commented code */

You can't comment code in Python

2.

MULTIPLE SELECT QUESTION

1 min • 1 pt

What are the data types available in Python?

Integer, Float, Complex, String, Boolean, List, Dictionary

Integer, Float, Complex, String, Boolean, Tuple, Set

Integer, String, Boolean, List, Dictionary, Tuple, Set

Integer, Float, Complex, String, Boolean, List, Dictionary, Tuple, Set

3.

MULTIPLE SELECT QUESTION

1 min • 1 pt

What is the built-in function that returns a list of valid attributes of an object?

type(object)

dir(object)

help(object)

getattr(object)

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

How do you retrieve the value provided by the user input?

value = readline()

value = prompt()

value = input()

value = ask()

5.

MULTIPLE SELECT QUESTION

1 min • 1 pt

How do you declare a variable in Python?

var name = "John"

name := "John"

let name = "John"

name = "John"

6.

MULTIPLE SELECT QUESTION

1 min • 1 pt

After running the following statement, what will be the values of the variables?

>>> given_name, family_name, age = "John", "Doe", 35, "US"

given_name is "John", family_name is "Doe" and age is 35

given_name is "John Doe", family_name is 35 and age is "US"

given_name is "John", family_name is "Doe" and age is the tuple (35, "US")

An error because there are too many values to unpack

7.

MULTIPLE SELECT QUESTION

1 min • 1 pt

After running the following statement, what will be the value returned?

>>> int(1.789)

1

1.789

0.789

An error because a float can't be converted to an integer

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?