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
pochemuha
3 years ago
12

Write a function named reverse_list that takes as a parameter a list and and reverses the order of the elements in that list. It

should not return anything - it should mutate the original list. This can be done trivially using slices, but your function must not use any slicing.
Computers and Technology
1 answer:
WITCHER [35]3 years ago
5 0

Answer:

The function in python is as follows:

def reverse_list(nums):

   half =int(len(nums)/2)

   for i in range(half):

       nums[i], nums[len(nums)-i-1] = nums[len(nums)-i-1],nums[i]

   print(nums)

Explanation:

This defines the function

def reverse_list(nums):

This gets the half the length of the list

   half =int(len(nums)/2)

This iterates through the list

   for i in range(half):

This swaps list items with the opposite item on the other half

       nums[i], nums[len(nums)-i-1] = nums[len(nums)-i-1],nums[i]

This prints the new list

   print(nums)

You might be interested in
Name 6 examples of how telemedicine is used in healthcare
swat32

Answer:

The digital transmission of medical imaging, remote medical diagnosis and evaluations, and video consultations with specialists are all examples of telemedicine.

Explanation:

3 0
3 years ago
One condition for deadlocks is the circular-wait condition. One way to ensure that this condition never holds is to impose a tot
Artyom0805 [142]
<h2>Dead lock is possible in Bank Transactions</h2>

Explanation:

Let us understand the term "Dead lock"

A deadlock is a situation where whole set of process is locked, since each of the process is waiting or holding the resource of another process. Each process will be interdependent and waiting for the same resource.

Deadlock is possible during bank transaction in the following situation:

A & B are two accounts where A tries to transfer funds to B and B tries to transfer fund to A.

When both tries to transfer funds at the same time, deadlock occurs.

A deadlock can be avoided by any one of the four methods.

They are: Mutual exclusion, No preemption, circular wait, hold and wait.

4 0
3 years ago
Read 2 more answers
You have a computer at home. The computer is connected to the Internet through a dial-up connection. Every time you connect to t
worty [1.4K]

Hiya!

When you connect to the internet (especially through a dial-up connection), your computer must make the request for network resources. This is usually done through a Modem, a device designed to establish and split the connection among your devices.

Fun fact; a dial up connection uses the same radio frequencies that you would use to talk on the phone; and they're in the audible spectrum. When you start up that connection, the reason all those funny noises happen is because it's "talking" to your ISP over those lines.

Hope this helps!

3 0
3 years ago
Order the steps needed to design a relational database.
tia_tia [17]

Answer:

1. List the fields needed to gain information

2. Break down the date into smaller parts

3. identify the fields holding stored data

4.distribute the fields into tables by subject

5. identify the common fields for linking tables

Explanation:

edge 2021

5 0
3 years ago
Pros and cons of the inter's<br> ability to access information
SpyIntel [72]
Pros and cons of the internet are the pros you can get the informaqtion needed to research and find out any information at your finger tips and get the answerws you need to certqin things fast. The cons the main one ise the people who misuse this to st4eal your information and indenity.
7 0
3 years ago
Other questions:
  • The n modifier after the tilde forces the index variable to expand only to the ______
    15·1 answer
  • Search engines enable you to
    13·2 answers
  • What type of hardware enable user to interact with a computer
    15·1 answer
  • Why is personal responsibility important when considering technology?​
    14·2 answers
  • When is padding required for a structure type variable? Group of answer choices When the structure contains a word-type variable
    9·1 answer
  • Diacuss three examples of divide and conquor approach​
    9·1 answer
  • You are adding more features to a linear regression model and hope they will improve your model. If you add an important feature
    7·1 answer
  • Please help it’s timed
    11·1 answer
  • 1 Which one of the following is a transmission
    9·1 answer
  • Type the correct answer in the box. Spell all words correctly. Which language should you use to add functionality to web pages?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!