Python Inputting Text Quiz

Python Inputting Text Quiz

10th Grade

9 Qs

quiz-placeholder

Similar activities

rangkaian arus bolak balik

rangkaian arus bolak balik

9th - 12th Grade

10 Qs

ARE YOU READY FOR SPM ?

ARE YOU READY FOR SPM ?

9th - 12th Grade

10 Qs

Taylor Swift

Taylor Swift

9th - 12th Grade

7 Qs

Animal

Animal

9th - 12th Grade

10 Qs

ABOUT ME 🤪🌸

ABOUT ME 🤪🌸

9th - 12th Grade

11 Qs

Introduction to App Inventor

Introduction to App Inventor

9th - 12th Grade

12 Qs

quiz equino

quiz equino

10th Grade

14 Qs

Leadership Styles

Leadership Styles

9th - 12th Grade

8 Qs

Python Inputting Text Quiz

Python Inputting Text Quiz

Assessment

Quiz

Others

10th Grade

Medium

Created by

Mr Lucas

Used 3+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a string in Python?

A collection of characters

A collection of functions

A collection of variables

A collection of numbers

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command is used to ask a question and let a user input data in Python?

query

print

input

ask

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to print a variable 'name' in a sentence?

print('Hello' & name)

print('Hello' name)

print('Hello', name)

print('Hello' + name)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to concatenate strings in Python?

Using ampersands

Using commas

Using plus sign

Using semicolons

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'input' function in Python?

To define a function

To receive user input

To perform mathematical operations

To output data to the console

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a string?

12345

True

3.14

Boeing 747

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you use a previously assigned variable within an input statement?

Using colons

Using plus sign

Using commas

Using brackets

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: name = input('What is your name? '); print('It is nice to meet you', name)

It is nice to meet you

It is nice to meet you [name]

What is your name?

It is nice to meet you followed by the user's input

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to ask a user for their favorite color and print it?

color = input('What is your favorite color? '); print('Your favorite color is' & color)

color = input('What is your favorite color? '); print('Your favorite color is' color)

color = input('What is your favorite color? '); print('Your favorite color is' + color)

color = input('What is your favorite color? '); print('Your favorite color is', color)