Module 1 Quiz

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Have a look at the four Python expressions below. Which one of these will throw an error?

"The correct answer to this multiple choice question is answer number" + 2

How do you insert COMMENTS in Python code?

#This is a comment

For which applications can you use Python?

- You want to do some quick calculations. - For your new business, you want to develop a database-driven website. - Your boss asks you to clean and analyze the results of the latest satisfaction survey.

What is the correct file extension for Python files?

.py

What is the output of the following code: var1 = 1 var2 = 2 var3 = "3" print(var1 + var2 + var3)

Error

What are the correct types for the following variables: a, b and c a = 3.0 b = str(a) c = False

a is of type float, b is of type str, c is of type bool

Which one is NOT a legal variable name in Python?

my-var

What is a correct syntax to output "Hello World" in Python?

print("Hello World")

What is the correct syntax to output the type of a variable or object in Python?

print(type(x))

How do you create a variable with the numeric value 5 ?

x = int(5.5) x = 5


Set pelajaran terkait

HCI (Human Computer Interaction) Quiz ([WRONG] means the answer guessed was incorrect. Choose another answer)

View Set

R. Point-Slope Form of a Line (problems with answers)

View Set

Abnormal Psychology 10e Midterm (TIU)

View Set

Nurse226 test 3 Week 9 chp 21 pages 729-740,

View Set

Economics topic 2 lesson 1-3 test

View Set

The Nervous and Endocrine Systems

View Set

Terms relating to "American democracy has overcome big stress tests since the 2020 election."

View Set

Maternal Infant practice questions for ATI CMS

View Set