Python Variables & Data Types

 

What will be the output of the following code?
a = 10.5
print(type(a))

 
 
 
 

 

Variable names in Python are always case-sensitive:

 
 

 

Which of the following is a mutable data type in Python?

 
 
 
 

 

What data type will the variable x have after the following code runs?
x = 10 + 5.5

 
 
 
 

 

Python has no command for declaring a variable. A variable is created the moment you first assign a value to it:

 
 

 

What will be the output of the following code?
x = 5
print(type(x))

 
 
 
 

 

Can you declare a variable in Python without assigning any value?

 
 

 

Which data type is used to store a sequence of characters in Python?

 
 
 
 

 

Which of the following is the correct way to declare a variable in Python?

 
 
 
 

 

What will be the output of the following code?
x = “10”
y = 5
print(x + y)

 
 
 
 

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments