Python Round 1

Python Round 1

University

7 Qs

quiz-placeholder

Similar activities

Python Basics

Python Basics

University

10 Qs

Python Data Types Quiz

Python Data Types Quiz

10th Grade - University

11 Qs

Python

Python

University

10 Qs

Python-Matrix-Reloaded-Workshop

Python-Matrix-Reloaded-Workshop

University

10 Qs

PSP Week3

PSP Week3

University

10 Qs

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Python-1st

Python-1st

University

10 Qs

Exploring Python: Input and Output Essentials

Exploring Python: Input and Output Essentials

9th Grade - University

10 Qs

Python Round 1

Python Round 1

Assessment

Quiz

Computers

University

Hard

Created by

Noor Malik

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code?

   ```python

   print("Hello, world!")

   ```

Hello, world

"Hello, world!"

Hello, world!

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How do you check the data type of a variable in Python?

type(variable)

typeof(variable)

datatype(variable)

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

 

Which of the following is a valid variable name in Python?             

my_variable

123variable

variable123

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct way to write a comment spanning multiple lines in Python?

// This is a comment

/* This is a comment */

   ''' This is a comment '''

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct way to create a function in Python?

create myFunction():

def myFunction():

function myfunction():

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, 'Hello', is the same as "Hello"

 

True

False

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code?

   ```python

   x = "Hello"

   y = "World"

   print(x + y)

   ```

  Hello World

HelloWorld

Hello + World