Python Basics Day 2

Python Basics Day 2

University

7 Qs

quiz-placeholder

Similar activities

T02: Python - The Basics

T02: Python - The Basics

University

10 Qs

CIS1101-programming practice2

CIS1101-programming practice2

University

10 Qs

Roteamento IS-IS

Roteamento IS-IS

University

10 Qs

lRns1iNugLyyt4dxLrv808nuO6ndDmJ86yAkwN9blE=

lRns1iNugLyyt4dxLrv808nuO6ndDmJ86yAkwN9blE=

University

10 Qs

FGCT4023 Topic 6 - Interactivity

FGCT4023 Topic 6 - Interactivity

University

10 Qs

Functions in Python

Functions in Python

University

10 Qs

Chapter 9 Creating Web Applications

Chapter 9 Creating Web Applications

University

10 Qs

Input and Output Devices Quiz

Input and Output Devices Quiz

2nd Grade - University

10 Qs

Python Basics Day 2

Python Basics Day 2

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Ninitha C

FREE Resource

AI

Enhance your content in a minute

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

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Python accepts single ('), double (") and triple (''' or """) quotes to denote strings. Which of the following is NOT acceptable Python syntax?

print('Hello World')
print("Hello World")
print('Hello World")
print(""'Hello World'"")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

data = "No Way!" The expression len(data) evaluates to:

7
9
8
6

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What syntax can you use to insert a line break between strings so that they appear over multiple lines?

\l
/
\\n
\n

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the output be from the following code? print("3+4")

7
34
3+4
SyntaxError

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The title( ) function

assigns title
returns string in title case
returns the title of the file
forms a new title for the given string

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you insert COMMENTS in Python code?

# this is a comment
/* this is a comment */
// this is a comment
-- this is a comment

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

s1="Hello" s2="10" print(s1+n1) What is the error in this code?

print statement not written in quotes
Numeric value not written in quotes
colon not written after the print statement
string cannot be added to a number

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?

Discover more resources for Computers