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
7nadin3 [17]
2 years ago
15

Write the code to produce a for loop that counts down from 20 to 0 by 2’s and prints the number each time it goes through the lo

op. (python)
Computers and Technology
1 answer:
yulyashka [42]2 years ago
3 0

Explanation:

Count-controlled for loop (Three-expression for loop)

This is by far the most common type. This statement is the one used by C. The header of this kind of for loop consists of a three-parameter loop control expression. Generally it has the form:

for (A; Z; I)

A is the initialisation part, Z determines a termination expression and I is the counting expression, where the loop variable is incremented or dcremented. An example of this kind of loop is the for-loop of the programming language C:

for (i=0; i <= n; i++)

This kind of for loop is not implemented in Python!

Numeric Ranges

This kind of for loop is a simplification of the previous kind. It's a counting or enumerating loop. Starting with a start value and counting up to an end value, like for i = 1 to 100

Python doesn't use this either.

Vectorized for loops

They behave as if all iterations are executed in parallel. This means, for example, that all expressions on the right side of assignment statements get evaluated before the assignments.

Iterator-based for loop

Finally, we come to the one used by Python. This kind of a for loop iterates over an enumeration of a set of items. It is usually characterized by the use of an implicit or explicit iterator. In each iteration step a loop variable is set to a value in a sequence or other data collection. This kind of for loop is known in most Unix and Linux shells and it is the one which is implemented in Python.

Example of a simple for loop in Python:

>>> languages = ["C", "C++", "Perl", "Python"]  

>>> for x in languages:

...     print(x)

...  

C

C++

Perl

Python

>>>

You might be interested in
An administrator running a port scan wants to ensure that no processes are listening on port 23. What state should the port be i
a_sh-v [17]

Answer: Closed port

Explanation:

Port 23 basically refers to the telnet which provide very severe services and it is used to access the server remotely. We should always closed the port 23, when we are not using telnet services because to prevent it from being hacked due to the port scanning.

As, now a days it is rarely used by the hackers as it is difficult to access this services from the server.

Therefore, Closed port is the correct answer.

3 0
3 years ago
A word that has a specific, predefined meaning in a programming language is called
vampirchik [111]
<span>The correct answer is


A keyword</span>
5 0
3 years ago
Which automated method for VPN connection deployment would work best in combination with Microsoft Intune or Microsoft Endpoint
maks197457 [2]

There are different kinds of automated method for VPN connection deployment. The automated method for VPN connection deployment would work best  is ProfileXML

  • ProfileXML is known to be often used as a delivery methods in Windows PowerShell, Microsoft Endpoint Configuration Manager, and Intune. For an individual to be able to use the ProfileXML VPNv2 CSP setting, one have to construct XML by using the ProfileXML schema.

An individual can configure the Always On VPN client by using the PowerShell, Microsoft Endpoint Configuration Manager, or Intune. They all need an XML VPN profile to configure the appropriate VPN settings.

Learn more from

brainly.com/question/25554117

3 0
2 years ago
Which function can you perform on a word processor but not on a typewriter?
zmey [24]
A function you can perform on a word processor BUT NOT on a typewriter is editing.
5 0
3 years ago
Read 2 more answers
An extranet is a restricted network that relies on Internet technologies to provide an Internet-like environment within the comp
DerKrebs [107]

Answer:

A) False

Explanation:

Extranet

An extranet acts as a shared network, disseminating information present on the intranet. That is, if a private intranet shares some of its content with other users (be they sellers, customers, etc.), this shared network is what we call the extranet.

Intranet

Today, companies are looking for tools and methods to align internal communication, reduce costs, and centralize information and files. The intranet is one of these tools, which works restricted to a specific audience, such as a company. This way, collaborators can access it with their specific username and password.

The intranet is, then, a closed and internal network, and still allows the use of more communication protocols besides HTTP. Intranet access is typically done on a local server and a local network, which we call LAN, which means Local Area Network installed within the company.

This internal network connects users, allowing information exchange, file and document management, centralizing communication between users. With this tool, you can quickly and securely and efficiently connect companies and departments.

4 0
3 years ago
Other questions:
  • Because log-on procedures may be cumbersome and tedious, users often store log-on sequences in their personal computers and invo
    6·1 answer
  • Two samples of dirt are collected from a suspect's tread in his shoe and a crime scene. The forensic investigator does a gross e
    6·2 answers
  • To achieve asymptotically optimal performance, a skip list must use promotion probability . true or false and
    14·1 answer
  • All states that have altered judicial selection techniques in recent years have adopted some form of:
    10·2 answers
  • Hey, how is everyone????????????????????????????????
    8·2 answers
  • Write a C++ function using recursion that returns the Greatest Common Divisor of two integers. The greatest common divisor (gcd)
    14·1 answer
  • 8. A sprite is a simple spider shaped thing with n legs coming out from a center point. The angle
    10·1 answer
  • How many questions have you seen so far other than this one?
    10·2 answers
  • Who's hype for Halo Infinite?
    11·2 answers
  • What kinds of new input devices do you think might be invented in 10, 20, or 50 years? How might those devices change the world?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!