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
SOVA2 [1]
3 years ago
5

Assume that a 5 element array of type string named boroughs has been declared and initialized. Write the code necessary to switc

h (exchange) the values of the first and last elements of the array. So, for example, if the array's initial values were: brooklyn queens staten_island manhattan bronx then after your code executed, the array would contain: bronx queens staten_island manhattan brooklyn
Computers and Technology
1 answer:
hammer [34]3 years ago
6 0

Answer:

Explanation:

Let's do this in python. First we can set a placeholder variable to hold the first element of the array, then we can set that first element to the last element (5th) of that array. Then we set the last element of that array to the placeholder, which has value of the original first element of the array

placeholder = boroughs[0] # in python, 0 is the first element or arra

boroughs[0] = boroughs[-1] # -1 means the last element of the array

boroughs[-1] = placeholder

You might be interested in
On the line below, write two ways page numbers can be added to a document.
IgorC [24]

Answer: wiriting it and printing it

Explanation: duh

8 0
2 years ago
B. Find Addition of Binary Numbers: 1100112 + 11012
schepotkina [342]
Hello, I assume you mean 110011_2 + 1101_2

To add 110011+ 1101 we can setup the problem like the following:

   110011
+     1101 
-------------
  1000000

When we add 1 + 1 this equals 10 so we just carry the 1 and we keep doing that from right to left. Also 1 + 0 = 1 

7 0
2 years ago
Consider the following code:
Volgvan

Answer:

The code will get stuck in an infinite loop.

Explanation:

Since val is decreasing by 1 each time it meets the criteria of being smaller than 10, your code will get stuck in an infinite loop since val will always be smaller than 10.

Hope this helps :)

8 0
2 years ago
Complete the sentence.
anastassius [24]

Answer:

Compilation

Explanation:

" <em>Python is an interpreted, high-level, general-purpose programming language. It is is dynamically typed and garbage-collected. </em>"

But first it does a compilation for a file with the extension `<em>.pyc</em>`, so the answer is compilation, even though <em>python</em> is being <em>interpreted</em>

8 0
2 years ago
have a folder on your Windows computer that you would like to share with members of your development team. Users should be able
sladkih [1.3K]

Answer:

Create a group and make all user accounts members of the group.

Explanation:

8 0
2 years ago
Other questions:
  • A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
    6·1 answer
  • Compute the bitwise XOR between 10010100 and 11101010.
    12·1 answer
  • About.com is considered a (an):
    6·1 answer
  • you'll be organizing the various databases in your organization, and have recommended hiring a/an?A. internet specialist B. comp
    6·2 answers
  • In a Java Script language. create a two-dimension array consisting of numbers representing costs. After creating the array, prin
    11·1 answer
  • How to remove negative feedback on amazon?
    5·1 answer
  • Which text features does this section contain? Check all that apply.
    15·1 answer
  • With a heat exchanger, the temperature of the process fluid can be measured with a temperature-
    14·1 answer
  • If String str = "Computer Science";, then what is the value of str.substring(10);? ​
    6·1 answer
  • Explain where the “heart” of the station is and what can be found there? I will mark brainlyest! This is for the ISS (Internatio
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!