Basic Python Quiz

Basic Python Quiz

Basic Python MCQs with Answers

Guess the output:print ( len ( "4" * -1 ) )

Correct! Wrong!

Guess the output :print( 5 in "I am 25 years old" )

Correct! Wrong!

Guess the output :((14+4) // 2) ** 0.5

Correct! Wrong!

Guess the output:print("Hello World')

Correct! Wrong!

Advertisement

Guess the output:print("I'm a python developer")

Correct! Wrong!

Guess the output:print( type ( 3j ) )

Correct! Wrong!

3j can be viewed as 0+3j which is of type complex

Guess the output :a = 3jprint ( 0 is a.real )

Correct! Wrong!

a.real will give value 0.0 as a float so 0 is False for 0.0

Which of these statements is true

Correct! Wrong!

CPython is the reference implementation of the Python programming language. Written in C and Python, CPython is the default and most widely used implementation of the language. CPython can be defined as both an interpreter and a compiler as it compiles Python code into bytecode before interpreting it.

Advertisement

Which of these is valid variable name in python :$variable = 5self = 5_for = 5var = 5def = 5

Please select 2 correct answers

Correct! Wrong!

variable name cannot contain $ as a special characters but can contain _self is not a keyword in python while def is.

Guess the output :print( type ( print () ) )

Correct! Wrong!

Check Also

Bank-reconciliation-statement-MCQs-with-Answers

Bank Reconciliation Statement – MCQs with Answers – Quiz 2

Bank Reconciliation Statement – MCQs with Answers Bank Reconciliation Statement is a very helpful tool …

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

You cannot copy content of this page

error: Content is protected !!