.
  Vyom World.com . Let's Touch the Sky Together!  
.

Home
VyomWorld.com Home
Interview Questions
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
Fun
Send FREE SMS!
SMS Jokes
Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
GATE
GATE an Overview
GATE Preparation
Study Materal
GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
TOEFL Preparation
TOEFL Resources
GMAT Preparation
GMAT Resources
MBA Preparation
MBA Resources
Networking Concepts
Networking Concepts
Testing Preparation
Testing Resources
Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
Tutorials
Hardware Tutorial
1500 Free eBooks New!


Home » Placement Papers » Nucleus Placement Papers » Nucleus Previous Year Placement Paper

 

Nucleus Placement Paper -: Python Questions With Answers


Advertisements
Advertisements




Nucleus Previous Years Solved Sample Placement Papers

  1. Which of the following is true for variable names in Python?

    A. Underscore and ampersand are the only two special characters allowed

    B. Unlimited length Answer: Option B

    C. All private members must have leading and trailing underscores

    D. None of the mentioned

  2. Solution: Variable names in Python can be of unlimited length.
  3. What are the values of the following Python expressions?
    2**(3**2)
    (2**3)**2
    2**3**2

    A. 512, 64, 512 Answer: Option A

    B. 512, 512, 512

    C. 64, 512, 64

    D. 64, 64, 64

  4. Solution: - Expression 1: 2**(3**2) = 2**9 = 512. - Expression 2: (2**3)**2 = 8**2 = 64. - Expression 3: 2**3**2 is evaluated as 2**(3**2) due to the right-to-left associativity of the ** operator, resulting in 512.
  5. Which of the following is the truncation division operator in Python?

    A. |

    B. // Answer: Option B

    C. /

    D. %

  6. Solution: The // operator performs truncation division by discarding the decimal part of the quotient. For example: 20//3 = 6.
  7. What will be the output of the following Python code?
    l = [1, 0, 2, 0, 'hello', '', []]
    list(filter(bool, l))

    A. [1, 0, 2, ‘hello’, ”, []]

    B. Error

    C. [1, 2, ‘hello’] Answer: Option C

    D. [1, 0, 2, 0, ‘hello’, ”, []]

  8. Solution: The filter function filters out all elements of the list `l` that evaluate to `False` (e.g., 0, empty strings, empty lists). The result is [1, 2, ‘hello’].
  9. Which of the following functions is a built-in function in Python?

    A. factorial()

    B. print() Answer: Option B

    C. seed()

    D. sqrt()

  10. Solution: The `print` function is a built-in Python function. Functions like `factorial` and `sqrt` are part of the `math` module, while `seed` is part of the `random` module.
  11. Which of the following is the use of id() function in Python?

    A. Every object doesn’t have a unique id

    B. Id returns the identity of the object Answer: Option B

    C. All of the mentioned

    D. None of the mentioned

  12. Solution: The `id()` function returns the unique identity of an object in Python.
  13. The following Python program can work with ____ parameters.
    def f(x):
    def f1(*args, **kwargs):
    print("Sanfoundry")
    return x(*args, **kwargs)
    return f1

    A. any number of Answer: Option A

    B. 0

    C. 1

    D. 2

  14. Solution: The decorator function shown can accept any number of arguments using *args and **kwargs.




 


.

Recently Updated: New Placement Papers added.
Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

Copyright ©2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy