Answer:
Option (d) is the correct answer.
Explanation:
An Array is used to store multiple variables in the memory in the continuous memory allocation on which starting index value is starting from 0 and the last index value location is size-1.
In java programming language the array.length is used to tells the size of the array so when the user wants to get the value of the last element, he needs to print the value of (array.length-1) location so the correct statement for the java programming language is to print the last element in the array named ar is--
System.out.println(ar[ar.length-1]);
No option provides the above statement, so option d (None of these) is correct while the reason behind the other option is not correct is as follows--
- Option a will prints the size of the array.
- Option b also gives the error because length is an undeclared variable.
- Option c will give the error of array bound of an exception because it begs the value of the size+1 element of the array.
#First we define the variables to house the temperatures
#temp is an empty array that will be used to store the temperature
Temp = []
#The months is defined as stated below
months = 12
#Ask the user for the temperature input and unit if possible
print("Kindly enter the temperature here")
#the program enter loop to get the temperatures.
for x in range(months):
InitTemp = str(input("Kindly add the unit behind the number .eg C for celcius"))
Temp.append(InitTemp)
j=0
for x in range(len(Temp)):
j=j+1
print("The Temperature is", " ", Temp[x], "for the ", j, "Month" )
#there is an attached photo for the flowchart
Answer:command economy is a key feature of any communist society. Cuba, North Korea, and the former Soviet Union are examples of countries that have command economies, while China maintained a command economy for decades before transitioning to a mixed economy that features both communistic and capitalistic elements
I think the answer to this is SmartArt. it helps you create any type of diagrams in either powerpoints or word.
Answer:
Internet
Explanation:
A collection of a set of instrument that solve a problem is called the internet.
The Internet is an enormous networking infrastructure that uses the Internet protocol suite (TCP/IP). It connects millions of computers together globally, forming a network in which computers can communicate with each other provided that they are both connected to the Internet.
The Internet contains billions of web pages and resources created by software engineers from around the world, making it a limitless place to locate information and solve peculiar problems.