• The AI Problems, The Underlying Assumption, What Is An AI Techniques, The Level Of The Model, Criteria For Success...
  • Defining The Problems As A State Space Search, Production Systems, Production Characteristics, Production System Characteristics...
  • Overview, MiniMax, Alpha-Beta Cut-off, Refinements, Iterative deepening, The Blocks World, Components Of A Planning System....

Wednesday, 29 July 2020

PYTHON GTU MCQ (CH-1 Python variables and datatypes)

PYTHON 
[SUBJECT CODE: 2180711]
CH-1 PYTHON INTRODUCTION 


Topics Covers:-

  • The basic elements of python 
  • Branching Programs 
  • Control Structures 
  • Strings and Input 
  • Iteration
  • Strings, Tuples, Lists and Dictionaries 
  • Lists and Mutability 
  • Functions as Objects
MCQ:-

1. What is the maximum possible length of an identifier?

a) 31 characters
b) 63 characters
c) 79 characters
d) none of the mentioned

2.Which of the following is invalid?
a) _a = 1
b) __a = 1
c) __str__ = 1
d) none of the mentioned

3.Why are local variable names beginning with an underscore discouraged?
a) they are used to indicate a private variables of a class
b) they confuse the interpreter
c) they are used to indicate global variables
d) they slow down execution

4.All keywords in Python are in _________
a) lower case
b) UPPER CASE
c) Capitalized
d) None of the mentioned

5.Which of the following is an invalid statement?
a) abc = 1,000,000
b) a b c = 1000 2000 3000
c) a,b,c = 1000, 2000, 3000
d) a_b_c = 1,000,000

6.Which of the following cannot be a variable?
a) __init__
b) in
c) it
d) on

7.Which of the following is not a keyword?
a) eval
b) assert
c) non local
d) pass

 8.Which one of these is floor division?
a) /
b) //
c) %
d) None of the mentioned

9.Which is the correct operator for power(xy)?
a) X^y
b) X**y
c) X^^y
d) None of the mentioned

10.What is the order of precedence in python?
i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Addition
vi) Subtraction


a) i,ii,iii,iv,v,vi
b) ii,i,iii,iv,v,vi
c) ii,i,iv,iii,v,vi
d) i,ii,iii,iv,vi,v

11.Mathematical operations can be performed on a string.
a) True
b) False

12.Operators with the same precedence are evaluated in which manner?
a) Left to Right
b) Right to Left
c) Can’t say
d) None of the mentioned

13.What is the output of this expression, 3*1**3?
a) 27
b) 9
c) 3
d) 1

14.Which one of the following has the same precedence level?
a) Addition and Subtraction
b) Multiplication, Division and Addition
c) Multiplication, Division, Addition and Subtraction
d) Addition and Multiplication

 15.Which one of the following has the highest precedence in the expression?
a) Exponential
b) Addition
c) Multiplication
d) Parentheses

16.Given a function that does not return any value, What value is thrown by default when executed in shell.
a) int
b) bool
c) void
d) None

17.What will be the output of the following Python code?

  1. >>>str="hello"

  2. >>>str[:2]

  3. >>>

a)he
b)lo
c)olleh
d) hello

18.What is the return type of function id?
a) int
b) float
c) bool
d) dict

19.In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed.

  1. >>>x = 13 ? 2

objective is to make sure x has a integer value, select all that apply (python 3.xx)

a)x=13//2
b)x=int(13/2)
c)x=13%2
d) All of the mentioned

20.What error occurs when you execute the following Python code snippet?

apple = mango

a)SyntaxError
b)NameError
c)ValueError
d)TypeError

21.What will be the output of the following Python code snippet?
def example(a):
     a = a + '2'
     a = a*2

     return a

>>>example("hello")

a) indentation Error
b) cannot perform mathematical operation on strings
c) hello2

d) hello2hello2

22.In order to store values in terms of key and value we use what core data type.
a) list
b) tuple
c) class
d) dictionary

23.What is the return value of trunc()?
a) int
b) bool
c) float
d) None

24.Which of the following is not a complex number?
a) k = 2 + 3j
b) k = complex(2, 3)
c) k = 2 + 3l
d) k = 2 + 3J

25.What is the type of inf?
a) Boolean
b) Integer
c) Float
d) Complex


More MCQ Uploading Soon... Stay Tune

Comment Your View In Below Section..
it's Very Helpful...

Tuesday, 28 July 2020

ARTIFICIAL INTELLIGENCE GTU MCQ(CH-6 Uncertain Knowledge)

ARTIFICIAL INTELLIGENCE 

[ SUBJECT CODE: 2180703 ]

CH-5 UNCERTAIN KNOWLEDGE 


Topics Covers:-

Procedural Versus Declarative Knowledge, Logic Programming, Forward Versus Backward Reasoning. 

MCQ:-

1.How the entries in the full joint probability distribution can be calculated?
a) Using variables
b) Using information
c) Both Using variables & information
d) None of the mentioned


2.How the bayesian network can be used to answer any query?
a) Full distribution
b) Joint distribution
c) Partial distribution
d) All of the mentioned


 3.To which does the local structure is associated?
a) Hybrid
b) Dependant
c) Linear
d) None of the mentioned

4.Which condition is used to influence a variable directly by all the others?
a) Partially connected
b) Fully connected
c) Local connected
d) None of the mentioned


5.What is the consequence between a node and its predecessors while creating bayesian network?
a) Functionally dependent
b) Dependant
c) Conditionally independent
d) Both Conditionally depend


6.What is the form of Fuzzy logic?
a) Two-valued logic
b) Crisp set logic
c) Many-valued logic
d) Binary set logic


7.Traditional set theory is also known as Crisp Set theory.
a) True
b) False


8.The truth values of traditional set theory is ____________ and that of fuzzy set is __________
a) Either 0 or 1, between 0 & 1
b) Between 0 & 1, either 0 or 1
c) Between 0 & 1, between 0 & 1
d) Either 0 or 1, either 0 or 1

 9.The room temperature is hot. Here the hot (use of linguistic variable is used) can be represented by _______
a) Fuzzy Set
b) Crisp Set
c) Fuzzy & Crisp Set
d) None of the mentioned


10.The values of the set membership is represented by ___________
a) Discrete Set
b) Degree of truth
c) Probabilities
d) Both Degree of truth & Probabilities


11.Fuzzy Set theory defines fuzzy operators. Choose the fuzzy operators from the following.
a) AND
b) OR
c) NOT
d) All of the mentioned


12.Fuzzy logic is usually represented as ___________
a) IF-THEN-ELSE rules
b) IF-THEN rules
c) Both IF-THEN-ELSE rules & IF-THEN rules
d) None of the mentioned


13.______________ is/are the way/s to represent uncertainty.
a) Fuzzy Logic
b) Probability
c) Entropy
d) All of the mentioned


14.Which is true for Decision theory?
a) Decision Theory = Probability theory + utility theory
b) Decision Theory = Inference theory + utility theory
c) Decision Theory = Uncertainty + utility theory
d) Decision Theory = Probability theory + preference


15.What enables people to recognize people, animals and inanimate objects reliably?
a) Speech
b) Vision
c) Hear
d) Perception


 16.How many types of recognition are there in artificial intelligence?
a) 1
b) 2
c) 3
d) 4


17.Which are recognized by vision?
a) Objects
b) Activities
c) Motion
d) Both Objects & Activities


18.Which object recognition process is an error-prone process?

a) Bottom-up segmentation
b) Top-down segmentation
c) Both Bottom-up & Top-down segmentation
d) None of the mentioned


 19.Which is the only way to learn about the different kinds of human faces?
a) Perception
b) Speech
c) Learning
d) Hearing


20.What does the bayesian network provides?
a) Complete description of the domain
b) Partial description of the domain
c) Complete description of the problem
d) None of the mentioned


More MCQ Uploading Soon...
Stay Tune

Comment Your View In Below Section..

it's Very Helpful...