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
2 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]2 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
What to do when microsoft word is eating your words?
Aloiza [94]
Update it so it wont do that
4 0
3 years ago
research about the various models of intel processors from the last decade focusing on their speed and cost​
Likurg_2 [28]

The Intel announced the eighth- generation chips will offer up to 40 percent speed boost  over the previous generation.

Explanation:

The most popular Intel processors are the core i3, i5, and i7 product lines. The core i3 is entry level and core i7 processors are the powerful hyper-threaded quad-core options.

The CPU does good job in understanding and completing single tasks. A clock speed of 3.5 GHz to 4.0 GHz is considered a good clock speeding for gaming. It is useful for having good single thread performance.

Intel's prior series of 8086,80186, 80386 and 80486 microprocessors, the first P5 based microprocessor released as original Intel Pentium.

8 0
3 years ago
When widgets, or portable chunks of code, are embedded on html pages and thereby help increase the functionality of those pages,
Anna11 [10]
<span>When widgets, or portable chunks of code, are embedded on html pages and thereby help increase the functionality of those pages, consumers embrace one of the greatest virtues of social media known as Collaboration.</span>
5 0
3 years ago
Free Brainliest Again
REY [17]

Answer:

hi

Explanation:

7 0
3 years ago
Read 2 more answers
You are building a system for a Housing Society, such as Bahria Town. You are supposed to design a very
Rudiy27

Answer:

122e²edafetejtjthrhhrhehegegegritirutu5oydodyo6ifyifi5did5i5isi5itirusritursududtustudidtidtiisisus5us5ususrursusududtidtidtidudtidtidtidtidtursustusriruausrysrysysrusrus4sus4us4y4as4us4us4us4us4ys4u5su5su

Explanation:

tiyrygtghyyhhgghghhghnghgmjfhfhhrzjjxtxthxthxthztjtjtdjstjdtjztjztjztjtzjzhzxhztzthzrhztuzthhuthhtxxfhzthzthzttuhzthtzjztuzztuztutuztfhruryryryegegrhrhrhrhrhgfhdhdhdhdhfddhdhhfhfhjfhfhfhfhdhdhddhdhjdhjff

6 0
2 years ago
Other questions:
  • Which of the following statements most accurately describes the difference between aptitudes and skills?
    8·1 answer
  • You order a new personal computer. A representative from the store calls to ask if you need CD-copying software in your personal
    12·1 answer
  • 2. Which of the following best describes the protocols used on the Internet?
    15·1 answer
  • What inspired john logie baird to create the television?
    11·1 answer
  • Which of the following is true regarding data acquisition? Because data acquisition is often technical, the research team does n
    15·2 answers
  • How do u set up a Wi-Fi network on Android ​
    5·1 answer
  • 4.11 lesson practice edhesive
    8·2 answers
  • Which function in Excel tells how many
    6·1 answer
  • How to make a harmonic mean algorithm in bash Linux?
    15·1 answer
  • you manage a network that has multiple internal subnets. you connect a workstation to the 192.168.1.0/24 subnet. this workstatio
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!