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]
3 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]3 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
In excel what happens when rename a sheet from sheet1 to inventory​
makvit [3.9K]

Answer:

Explanation:

The sheet name at the footer of the screen gets changed from sheet1 to inventory.

4 0
3 years ago
The name of a person their address and their contact information like phone number and email address or consider the minimum inf
andrew-mc [135]

Answer:

false

Explanation:

6 0
4 years ago
The most basic function of firewalls is to
adelina 88 [10]
<span>A firewall is a network security system that monitors and controls the incoming and outgoing network traffic based on security rules that are configured by the network administrator.</span>
5 0
3 years ago
What is one difference between using Telnet or SSH to connect to a network device for management purposes?
Gnom [1K]

Answer:

The correct answer to the following question will be "Telnet provides a piece of login information in simple text, while this type of information is encrypted by SSH".

Explanation:

If you're using a distribution of Linux for a long period and maybe you're no longer a newbie on Linux, you might also have come through words such as telnet or SSH.

  • Today SSH is just the main application for Access to the internet between connected devices and repositories.
  • Telnet was the shared abbreviation of networking and communications and is the most well-known networking application for the UNIX framework.

So, it's the right answer.

7 0
3 years ago
3.1.2 Quiz: What Can Information Technology Do for You? Question 8 of 10 What is one reason why a business may want to move enti
balu736 [363]

Answer:

C. To focus on a global market

Explanation:

Information technology can be defined as a set of components or computer systems, which is used to collect, store, and process data, as well as dissemination of information, knowledge, and distribution of digital products.

An information technology interacts with its environment by receiving data in its raw forms and information in a usable format.

Generally, it is an integral part of human life because individuals, organizations, and institutions rely on information technology and systems in order to perform their duties, functions or tasks and to manage their operations effectively. For example, all organizations make use of information technology and systems for supply chain management, process financial accounts, manage their workforce, and as a marketing channels to reach their customers or potential customers.

Additionally, an information system or technology comprises of five (5) main components;

1. Hardware.

2. Software.

3. Database.

4. Human resources.

5. Telecommunications.

Hence, information technology or system relies on the data it receives from its environment, processes this data into formats that are usable by the end users.

One reason why a business may want to move entirely online is to focus on a global market through the use of social media platforms and networks to reach out to customers in various geographical location.

5 0
3 years ago
Other questions:
  • Define the term entity and give an example of an entity .
    10·1 answer
  • An example of software most commonly associated with productivity software is ____.
    12·1 answer
  • Which one of the following items would you be most likely to keep in a database? A. Payroll records B. Address book C. Financial
    7·1 answer
  • What effect does the interconnectedness of modern media have on society?
    14·2 answers
  • What is Systems Engineering?
    5·1 answer
  • The thinner the thread on the screw, the ______the force needed but the _____the distance.
    15·1 answer
  • When a subdomain has been delegated to a zone on another server, the DNS server hosting the parent zone maintains only an NS rec
    14·1 answer
  • What is the purpose of the Split command?
    10·2 answers
  • 11. a) What is character size measured in?
    5·1 answer
  • What are the dominant InfoSec-related credentials used to document knowledge and/or experience?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!