Coding test

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

what will be the output of this code? ([5>8, 6>3,3>1])

True

what is maximum possible length of an identifier?

Unlimited

Which of the following statements is correct for variable names in python language?

Unlimited length

What will be the output of this program? x = ['XX', 'YY'] for i in a: i.lower() print(a)

['XX', 'YY']

Which character is used in python to make a single line comment

#

Which of the following is correctly evaluated for this function? pow(x,yz)

(x**y)%z

Which one is the correct extension of the Python file?

.py

In which year was the python language developed?

1989

In which year was the python 3.0 version developed?

2008

round (4.576) What will be the output of this function?

5

what will be the output of this code? import math abs(math,sqrt(36))

6.0

In which language is python written?

C

Which of the following has the same precedence level?

Division and Multiplication

What is the method inside the class in python language?

Function

Who developed the python language?

Guido van Rossum

Which of the following syntaxes is the correct syntax to read from a simple text file stored in "d:\java.txt"?

Infile = open ("c:\\scores.txt","r")

which of the following statements is correct regarding the object oriented programming concept in python?

Objects are real world entries while classes are not real

Which of the following has the highest precedence in the expression?

Parentheses

Which of the following precedence order in python?

Parentheses, Exponents, Multiplication, Division, Addition, Subtraction

Which of the following operators is the correct option for power(ab)? a. a^b b. a** b c. a^^b d. a^*b

a**B

what will be the output of this statement? >>>"a"+"bc"

abc

Which of the following statements in INCORRECT in python language? a. xyzp = 5,000,000 b. x z y p = 50000000 c. x__x_z = 5888888

b. spaces are not allowed in variable names

What will be the output of this code? x= 1 while true: if x% 5== 0 break print(x) x + = 1

error

What will be the output of this function? ([2,4,06]

false function

Which of the following statements is correct in a python code? 1. class Name: 2. def __ init__ (javapoint): 3. javajavapoint = java 4. name1= Name("ABC") 5. name2 = name 1

id(name1) and id(name2) will have the same value.

what do we use to define a block of code in python language?

indentation

Why does the name of local variables start with an underscore discouraged ?

it indicates a private variable of a class

Which of the following declarations is INCORRECT? 1. _x = 2 2. ____x = 3 3. ___xyz__ = 5 4. none of these

none of these (low readability)

what will be the output of this code? >>>"javatpoint"[5:]

point

Which of the of the following is a built in function in python language?

print()

which of the following words cannot be a variable? 1. _val 2. val 3. try d. try_

try, is a keyword

Which of the following is not a keyword in python language? a. val b. raise c. try d. with

val


Ensembles d'études connexes

Ch.17 preoperative nursing management

View Set

PrepUs for Pediatrics Chapter 33

View Set