Module 1 Quiz

अब 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


संबंधित स्टडी सेट्स

CA LIFE STATE PRACTICE EXAM PT 1(FROM EXAM FX ONLINE TEST)

View Set

Mobile CSP Quarter 3 study guide

View Set

Next Step Full Length Missed Questions

View Set

IS terms: Application and Cloud Security

View Set

EOC12: End of Chapter Problems - Ch. 12: Perfect Competition and the Supply Curve

View Set

Chapter 15 The Four Phases of the Thirty Years War

View Set

Chapter 8 Psych Exam 2 - Mangano

View Set

GOVT 2305 - Chapter 11 - Congress - The Struggle for Democracy

View Set

Routing, Switching and Wireless: Modules 1 -4

View Set

Spreadsheets Practice Warm-Up Assignment

View Set