Summary: Python Essentials 2

Study material generic cover image
  • This + 400k other summaries
  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
PLEASE KNOW!!! There are just 92 flashcards and notes available for this material. This summary might not be complete. Please search similar or other summaries.
Use this summary
Remember faster, study better. Scientifically proven.
Trustpilot Logo

Read the summary and the most important questions on Python Essentials 2

  • 1 Module 1

  • 1.1 Modules

    This is a preview. There are 5 more flashcards available for chapter 1.1
    Show more cards here

  • You want to invoke the function make_money() contained in the module named mint. Your code begins with the following line:import mintWhat is the proper form of the function's invocation?

    Call the function using `mint.make_money()`.
  • You've written a function named make_money on your own. You need to import a function of the same name from the mint module and don't want to rename any of your previously defined names. Which variant of the import statement may help you with the issue?

    from mint import make_money as make_more_money
  • What form of the make_money function invocation is valid if your code starts with the following line?from mint import *

    The valid form is make_money().
  • Which function can you use to list all functions in a module?

    You can use the "dir()" function to list all functions in a module provided the function has been imported in full.
  • What function describes the underlying platform, and what parameter allows you to shorten the printed output?

    You can use the "platform.platform()" function. You can shorten the output with the "terse=True" parameter.
  • What code should you run if you just want to know the generic name of the processor which runs your OS?

    You can run the function platform.processor()
  • What code should you run if you just want to know the generic name of the OS?

    You can run the function platform.system()
  • What code should you run if you just want to know the version of the OS?

    The OS version is provided as a string by the platform.version() function.
  • What code should you run if you just want to know the version of python?

    platform.python_version_tuple()
  • What is the expected value of the result variable after the following code is executed?import math   result = math.e == math.exp(1)

    The expected value of the result variable is True.
PLEASE KNOW!!! There are just 92 flashcards and notes available for this material. This summary might not be complete. Please search similar or other summaries.

To read further, please click:

Read the full summary
This summary +380.000 other summaries A unique study tool A rehearsal system for this summary Studycoaching with videos
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

Topics related to Summary: Python Essentials 2