Programming

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Once your program is compiled to byte code what happens?

*it goes for execution to Python virtual machine*

What are the steps carried out for Python to run a script

*it's first compiled into byte code and then routed to a virtual machine*

What is byte code?

*lower level form of your program after Python compiles it*

in simple form, how do you display a string

*print('whatever')*

On Windows, where is the system path for Python 2.7?

*C:\Python27\python*

What are the five implementations of Python?

*CPython, Jython, IronPython, Stackless, and PyPy*

What is the difference between .py and .pyc extensions

*If the Python process has write access then it would store the byte code in files that end with .pyc which means compiled. Python 3.2 files show up alongside source code files in the same directory. In 3.2 and later, it saves its .pyc byte code files in sub-directories named _pycache_ where the source files are located.*

How can you start an interactive interpreter session?

*Windows, click start then all programs click Python and then select the Python (command line) option*

What is the Python interpreter?

*a program that runs the Python programs you write*

Why do you not need to include the .py extension when calling an object

*because when it looks for the actual file it includes the suffix in the search procedures*

What is Python compiled into source code?

*byte code*

Test a function that prints the current working directory

*import os* *os.getcwd()*

Import a library to fetch the name of the platform for Windows

*import sys* *print(sys.platform)*

Name a disadvantage to the interactive prompt

*programs you type go away as soon as you execute them*

What does the % stand for?

*system command for the system's prompt, for instance C:\Python27lumberjack = 'okay'*

What is the PVM?

*the runtime engine of Python that interprets your compiled byte code*

What is source code?

*the statements you write for your program. ends with the .py extension*

how do you carry out a numeric expression using a number to the power of another?

print(2 ** 100)


संबंधित स्टडी सेट्स

för dig som går i 7B Den som kommer först i match får 11 kr

View Set

OB Ch. 11 Rational & Nonrational Models of Decision Making

View Set

Econ Learning Plan 6 - Activity 6

View Set

Chapter 9: Social Stratification in the United States & Chapter 10: Global Inequality

View Set

Chapter VIII - DISCHARGE OF N.I.

View Set

PRACTICE MIDTERM - HESI Leadership

View Set

DOMAIN 1 SECURITY AND RISK MANAGEMENT DOMAIN

View Set