Python Quiz-II | input() & eval() You must first complete Python Quiz – I before viewing this Lesson 0% Python Quiz- II input() and eval() click here to learn input() function and eval function NameEmail 1 / 14 Which function of python is used to read value of a variable? input() print() read() 2 / 14 What will be the result of following statement if value 'ABC' is input by using following statement?val=eval(input('Enter a value') Error will occur Nothing will happen 'ABC' will be stored in variable val 3 / 14 Which of the following can be used to read integer value? int(input("Enter integer value")) input("Enter integer value") float("Enter integer value") 4 / 14 What will be the data type of variable val if value 2.5 is input by using following statement?val=eval(input('Enter a value') int float complex 5 / 14 What will be the output of following statements?>>> b=eval(‘2.5’)>>> print(type(b)) <class 'float'> <class 'str'> <class 'complex'> 6 / 14 What is that default data type of value read using input() function? integer string boolean 7 / 14 What will be the data type of variable val if value True is input by using following statement?val=eval(input('Enter a value') float bool int 8 / 14 Which of the following can be used to read complex value? int(input('Enter a complex value=')) input('Enter a complex value=') complex(input('Enter a complex value=')) 9 / 14 what is the use eval() function? Convert string value to numeric value. Convert numeric value to string value 10 / 14 What will be the data type of variable val if value 2+3j is input by using following statement?val=eval(input('Enter a value') <class 'float'> <class 'str'> <class 'complex'> 11 / 14 Which of the following can be used to read floating point value? float(input('Enter a real value')) input('Enter a real value') int(input('Enter a real value')) 12 / 14 Which of the following is the syntax for reading a variable? input()=varname input(varname) varname=input() 13 / 14 What will be the result of following statement if values 10,20 are input by using following statement?val=eval(input('Enter a value') Error will occur (10,20) will be shown Nothing will happen 14 / 14 Which of the following can be used to read boolean values True/False? bool(input('Enter True or False=')) input('Enter True of False=') int(input('Enter True of False=')) Your score is LinkedIn Facebook Twitter VKontakte 0% Restart quiz Spread the love Lesson tags: eval() quiz, input() quiz, python quiz Python Quiz - I Number System for class 11 Back to: CBSE class 11 Computer Science NotesSpread the love