1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Firdavs [7]
3 years ago
7

When a Python script is running as a standalone program, what will the __name__ variable be set to?

Computers and Technology
1 answer:
Sholpan [36]3 years ago
5 0

Answer:

When a Python script is running as a standalone program, the __name__ variable will be set to __main__.

Explanation:

Python does not have main( ) function like some other programming language. So, when a command is given the interpreter to execute a python program, the code that is indented least (that is level 0) is executed first.

However, before doing that, it will define a few special variables. __name__ is one such special variable. If the source file is executed as the main program, the interpreter sets the __name__ variable to have a value “__main__”. If this file is being imported from another module, __name__ will be set to the module’s name.

You might be interested in
You are given an array of integers, each with an unknown number of digits. You are also told the total number of digits of all t
Vlad [161]

Answer:

Explanation:

Since all of the items in the array would be integers sorting them would not be a problem regardless of the difference in integers. O(n) time would be impossible unless the array is already sorted, otherwise, the best runtime we can hope for would be such a method like the one below with a runtime of O(n^2)

static void sortingMethod(int arr[], int n)  

   {  

       int x, y, temp;  

       boolean swapped;  

       for (x = 0; x < n - 1; x++)  

       {  

           swapped = false;  

           for (y = 0; y < n - x - 1; y++)  

           {  

               if (arr[y] > arr[y + 1])  

               {  

                   temp = arr[y];  

                   arr[y] = arr[y + 1];  

                   arr[y + 1] = temp;  

                   swapped = true;  

               }  

           }  

           if (swapped == false)  

               break;  

       }  

   }

8 0
3 years ago
System memory is on a computer motherboard?
Leya [2.2K]
Is this a true or fales question

8 0
3 years ago
Read 2 more answers
What type of purchase requisition is used to turn-in a recoverable/reparable material to the ssa?
m_a_m_a [10]

ZRX is the purchase requisition document type used to turn a recoverable repairable material for Remote customers to the SSA.

What is a purchase requisition?

Employees can start a purchase by sending internal documents called buy requisitions. A buy order is issued to a supplier to place the order for the goods/services in question once the purchase has received the relevant person or department's approval.

What is the purpose of a purchase requisition?

A purchase request form is a formal internal document that is utilized during the purchasing process. Employees utilize this to communicate the resources they require to department supervisors. Therefore, an employee will submit a formal request via a requisition form to the purchasing department if they have a requirement.

Learn more about purchase requisition: brainly.com/question/16413109

#SPJ4

5 0
2 years ago
What is block chain?
LuckyWell [14K]

Answer:

Block Chain is a system of recording information that makes it difficult or impossible to change, hack, or cheat the system.

A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems on the blockchain.

Hope this helps.

x

6 0
3 years ago
Read 2 more answers
Which operating system might cause the desktop background to change unexpectedly?
Hunter-Best [27]
I used computers for 3 years now and i think its B
4 0
3 years ago
Other questions:
  • What is a major plastics engineering project that is going on right now in Arizona?
    9·1 answer
  • Which system utility can you use to troubleshoot a computer that's slow to start by enabling or disabling startup programs?
    7·2 answers
  • Prewritten, commercially available sets of software programs that eliminate the need for a firm to write its own software progra
    7·1 answer
  • A system administrator is selecting an operating system for use by the company’s research and development team. The team require
    15·1 answer
  • The incompatibilities in speed between the various devices and the CPU make I/O synchronization difficult, especially if there a
    6·1 answer
  • What does 69 mean?<br> Whenever I watch memes they always talk about the number 69
    8·2 answers
  • Write a C# program named DoubleDecimalTest thatdeclares and displays two variables - a double and a decimal.Experiment by assign
    9·1 answer
  • What is the output of the following program?
    8·1 answer
  • 56- What is the term used when you press and hold the left mouse key and more the mouse
    8·1 answer
  • Question 9
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!