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
WITCHER [35]
3 years ago
8

Write a function swaparrayends() that swaps the first and last elements of the function's array parameter. ex: sortarray

Computers and Technology
1 answer:
Katena32 [7]3 years ago
3 0
Def swapArrayEnds( array ):
    tmp = array[ len( array ) - 1 ]
    array[ len( array ) - 1 ] = array[ 0 ]
    array[ 0 ] = tmp


You might be interested in
Ano ang maikling kwento??
marishachu [46]

Answer with Explanation:

Ang "maikling kuwento" ay isang uri ng<em> kathang-isip</em> na may pagkapareho sa nobela. Ito'y may buong tema ngunit mas maikli kaysa sa nobela at mas madali rin itong matapos basahin. Hango ito sa mga tunay na pangyayari sa buhay ng tao. Binubuo ito ng limang elemento: <em>tauhan, tagpuan, hidwaan, tema at plot. </em>Ito'y may balak na pukawin ang damdamin ng nagbabasa ayon sa kalagayan ng mga tauhan sa kuwento at ito'y nag bibigay ng mabuting aral.

Si <em>Edgar Allan Poe</em> ang tinaguriang<em> "Ama ng Maikling Kuwento." </em>

3 0
3 years ago
Sarah is a busy real estate agent with a growing clientele. She is looking to purchase a new computer and software so that she c
lyudmila [28]

Answer:

ASP.NET ,C#.NET,SQLServer,HTML,JavaScript

Explanation:

To build any web based application we need one presentation layer(HTML)

and for client side scripting JavaScript.

ServerSide ASP.NET Technology  and C#.NET to write your business layer

Sql programming to store data in sql server

5 0
3 years ago
Define a class named person that contains two instance variables of type string that stores the first name and last name of a pe
Katarina [22]

Answer:

Answered below

Explanation:

//Program is written using Java programming language.

Class Person {

private string firstName;

private string lastName;

void set firstName(string a){

firstName = a;

}

string getFirstName(){

return firstName;

}

void setLastname( string b){

lastName = b;

}

string getLastName( ){

return lastName;

}

void displayDetails( ) {

System.out.print(firstName);

System.out.print (lastName);

}

}

//Test program

Class Main{

public static void main(String args [] ){

Person person = new Person( )

person.setFirstName("Karen")

System.out.print(person.getFirstName)

person.displayDetails()

}

}

5 0
3 years ago
You want to buy a new car, and you are thinking about two alternatives, car A and car B. You like both cars, and you are conside
hjlf

Answer:

Task 1: T = c + (2.5n(A/M))+ m(1+r/100)ⁿ

Task 2: In both 5 & 10 years, Car A is more economical

Task 3: Printing returns the answer in a different dialogue box while return displays the answer in the same window.

Explanation:

Task 1:

C = Cost of car

n = Number of years

m = Maintenance Cost

r = Rate

M = Mileage per gallon

A = Annual mileage

T= Total Cost

T = c + (2.5n(A/M))+ m(1+r/100)ⁿ

Task 2

Car A In 5 years; T = 20000+ (2.5*5(15000/25))+1300(1+0.15)⁵= $30115

Car B In 5 years; T = 30000+ (2.5*5(15000/32))+1000(1+0.10)⁵= $37470

Therefore in 5 years, Car A is more economical.

Car A In 10 years; T = 20000+ (2.5*10(15000/25))+1300(1+0.15)¹⁰= $40259.225

Car B In 10 years; T = 30000+ (2.5*10(15000/32))+1000(1+0.10)¹⁰= $ 44312.49

Therefore in 10 years, Car A is still economical.

Task 3: Printing returns the answer in a different dialogue box while return displays the answer in the same window.

4 0
3 years ago
Using logical operators, 1 AND 0 =
g100num [7]
O. In an AND gate both values need to be 1 to equal 1.
4 0
3 years ago
Other questions:
  • Yesterday Hunter's laptop screen appeared to go black. The laptop was still running, but he could not see the desktop or any gra
    9·1 answer
  • What is Gamekit Loa3's all questsions
    14·1 answer
  • A friend has a CD of one of your favorite artists and has offered to let you copy it.
    13·1 answer
  • Which of the following can be sources of sediment? A. fragments of other rocks B. chemicals and minerals dissolved in water C. s
    11·1 answer
  • Justin signed a rental agreement for his new condo. How long is his lease? a p e x
    15·1 answer
  • Project manager Erica is discussing with her team to prepare a document to describe the deliverables and goals of a software pro
    13·1 answer
  • Miriam Is a network administrator. A few employees want to access sensitive Information stored on a backup device. She wants to
    13·1 answer
  • Hich of these statements is a value statement?
    14·2 answers
  • What will result if the following code is used in an HTML file? New Title
    13·2 answers
  • A while loop should be used if you want the user to watch the same video three times.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!