Infosys Campus Connect - IT Branches (Batch 2 To 5) Quiz

50 Questions | Total Attempts: 272

SettingsSettingsSettings
Infosys Campus Connect - IT Branches (Batch 2 To 5) Quiz - Quiz

This quiz is for Batch 2, 3, 4, 5 (IT branches) and contains 50 MCQ questions. All the best :)


Questions and Answers
  • 1. 
    a = True b = False c = False if a or b and c: print "IF" else: print "ELSE"
    • A. 

      IF

    • B. 

      ELSE

    • C. 

      Run Time Error

    • D. 

      None of These

  • 2. 
    count = 1 def doThis(): count = 1 for i in (1, 2, 3): count += 1 doThis() print count
    • A. 

      1

    • B. 

      2

    • C. 

      4

    • D. 

      None of These

  • 3. 
    Suppose list1 is [3, 4, 15, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)?
    • A. 

      [3, 4, 15, 20, 5, 25, 1, 3]

    • B. 

      [3, 15, 20, 5, 25, 1, 3]

    • C. 

      [1, 3, 3, 4, 15, 5, 20, 25]

    • D. 

      [3, 15, 20, 5, 25, ]

  • 4. 
    Which function removes an object from a list?
    • A. 

       list.index(obj)

    • B. 

      list.insert(index, obj)

    • C. 

      list.pop(obj=list[-1])

    • D. 

      list.remove(obj)

  • 5. 
    Which of the following function convert a String to a set in python?
    • A. 

       set(x)

    • B. 

      frozenset(s)

    • C. 

      dict(d)

    • D. 

      chr(x)

  • 6. 
    find the output of following statement: name = "snow storm"  print(name[6:8])
    • A. 

      st

    • B. 

      sto

    • C. 

      to

    • D. 

      error

  • 7. 
    What data type is the object below ? L = [1, 23, ‘hello’, 1]
    • A. 

      Lists

    • B. 

      Dictionary

    • C. 

      Class

    • D. 

      Tuples

  • 8. 
    Which of the following operators has its associativity from right to left?  
    • A. 

      +

    • B. 

      //

    • C. 

      %

    • D. 

      **

  • 9. 
    Identify the output of following statements : boxes = {} jars = {} crates = {} boxes['cereal'] = 1 boxes['candy'] = 2 jars['honey'] = 4 crates['boxes'] = boxes crates['jars'] = jars print(len(crates[boxes]))
    • A. 

      1

    • B. 

      2

    • C. 

      4

    • D. 

      7

  • 10. 
    What is the output? f = None for i in range (5):     with open("data.txt", "w") as f:         if i > 2:             break print(f.closed)  
    • A. 

      True

    • B. 

      False

    • C. 

      None

    • D. 

      Error

  • 11. 
    What is the output ? sets = {3, 4, 5} sets.update([1, 2, 3]) print(sets)
    • A. 

      {1, 2, 3, 4, 5}

    • B. 

      {2,1,3,4,5}

    • C. 

      {1,2,3,4}

    • D. 

      none of these

  • 12. 
    What is the output of the following code? a = {} a [2]=1 a [1]={2,3,4} print (a[1][1])  
    • A. 

      [2,3,4]

    • B. 

      3

    • C. 

      2

    • D. 

      an exception is thrown

  • 13. 
     ……............. clause is used to pass on privileges to other users in database 
    • A. 

      Create option

    • B. 

      Grant option

    • C. 

      Update option

    • D. 

      Select option

  • 14. 
    In which of the following is a single-entity instance of one type related to many entity instances of another type?
    • A. 

      One-to-One Relationship

    • B. 

      One-to-Many Relationship

    • C. 

      Many-to-Many Relationship

    • D. 

      Composite Relationship

  • 15. 
    In the __________ normal form, a composite attribute is converted to individual attributes.
    • A. 

      First

    • B. 

      Second

    • C. 

      Third

    • D. 

      Forth

  • 16. 
    The attribute that can not be divided into any other attributes is called ________
    • A. 

      Simple

    • B. 

      composite

    • C. 

      multivalued

    • D. 

      derived

  • 17. 
    _____________refers to the correctness and completeness of the data in a database
    • A. 

      Data Integrity

    • B. 

      Data Security

    • C. 

      Data Independence

    • D. 

      Data Constraints

  • 18. 
    To delete rows from table use command in SQL
    • A. 

      Drop

    • B. 

      Delete

    • C. 

      Rename

    • D. 

      All

  • 19. 
    Let F = {A → B, AB → E, BG → E, CD → I, E → C}. The closures, A+, (AE)+ and (ADE)+ will be
    • A. 

      ABCE, ABDE, ABCDI

    • B. 

      ABDE, ABCE, ABCDE

    • C. 

      ABCE, ABCE, ABCDEI

    • D. 

      None of the mentioned

  • 20. 
    A functional dependency between two or more non-key attributes is called
    • A. 

      Transitive Dependency

    • B. 

      Partial transitive dependency

    • C. 

      Functional Dependency

    • D. 

      Partial Functional Dependency 

  • 21. 
    A table that displays data redundancies yields  ____________ anomalies
    • A. 

      Insertion 

    • B. 

      Deletion

    • C. 

      Update

    • D. 

      All of them

  • 22. 
    A type of query that is placed within a WHERE and HAVING clause of another query is called
    • A. 

      Super Query

    • B. 

      Sub query

    • C. 

      Master query

    • D. 

      Multi-query

  • 23. 
    Which SQL keyword is used to sort the result-set?
    • A. 

      SORT

    • B. 

      SORT BY

    • C. 

      ORDER BY

    • D. 

      ORDER

  • 24. 
    Which method of cursor class is used to execute SQL query on database
    • A. 

      fetchone()

    • B. 

      execute()

    • C. 

      scroll()

    • D. 

      close()

  • 25. 
    Study the code import cx_Oraclecon = cx_Oracle.connect('pythonhol/[email protected]/orcl')cur = con.cursor()cur.execute('select * from employee')     Which code snippet will print all the reterived records
    • A. 

      for con in cur:     print con

    • B. 

      print cur.printall()

    • C. 

      for result in cur:    print result

    • D. 

      none of the above

Back to Top Back to top