Python data types

Python data types

University

15 Qs

quiz-placeholder

Similar activities

OPH HUM ENG 2023

OPH HUM ENG 2023

University

10 Qs

Practice the /θ/ Sound

Practice the /θ/ Sound

University

15 Qs

CIC2011 WEEK 6 QUIZ

CIC2011 WEEK 6 QUIZ

University

15 Qs

BB5

BB5

University

12 Qs

Midterm Examination 1 (Software Design)

Midterm Examination 1 (Software Design)

University

15 Qs

TTYL UNICA KAYE BALMEDIANO

TTYL UNICA KAYE BALMEDIANO

University

10 Qs

Loanwords Korean/Japanese

Loanwords Korean/Japanese

University

10 Qs

Sintese de Proteínas

Sintese de Proteínas

University

10 Qs

Python data types

Python data types

Assessment

Quiz

Others

University

Easy

Created by

Sherif Abdelhamid

Used 10+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume the variable x has been initialized to an integer value (e.g., x = 3). What does the following statement do?

x = x + 2

This would fail as it is a syntax error

Produce the value "false" because "x" can never equal "x+2"

Retrieve the current value for x, add two to it and put the sum back into x

Create a function called "x" and put the value 2 in the function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the value of x after the following statement executes:

x = 1 + 2 * 3 - 8 / 4

5.0

4

15

3.0

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following elements of a mathematical expression in Python is evaluated first?

*

/

()

+

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a Python reserved word?

iterate

continue

break

else

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a bad Python variable name?

Spam

_spam

23spam

SPAM23

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which character represents a comment in Python code?

*

#

&

$

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Python code needed to ask a user for input?

input("what is your name?")

input="what is your name?"

(input)=what is your name?

input=what is your name?

Create a free account and access millions of resources

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?