What values are stored in nums after the following code segment has been executed?

int[] nums = {50, 100, 150, 200, 250};
for (int n : nums)
{
n = n / nums[0];
}
[1, 2, 3, 4, 5]
[1, 1, 1, 1, 1]
[1, 100, 150, 200, 250]
[50, 100, 150, 200, 250]
An ArithmeticException is thrown.

Answers

Answer 1

Answer:

D.[50, 100, 150, 200, 250]

Explanation:

This is a trick question because the integer n is only a counter and does not affect the array nums. To change the actual array it would have to say...nums[n] = n/nums[0];


Related Questions

Computer programming 5

Answers

Good luck this is the last one

discuss the term business information SYSTEMS ​

Answers

Answer:

Business information systems provide information that organizations use to manage themselves efficiently and effectively, typically using computer systems and technology. Primary components of business information systems include hardware, software, data, procedures (design, development, and documentation) and people.

Explanation:

Hope It Help you

Computer programming

Answers

Here is the answer for the question

The microprogram counter (MPC) contains the address of the next microcode statement for the Mic1 emulator to execute. The MPC value is either the next sequential microcode instruction in the control store (PROM), or a microcode instruction in the control store pointed to by the ADDR bits in the current executing microinstruction. What part of the current executing microcode instruction determines the value placed in the MPC

Answers

Answer:

MAR bit

Explanation:

The MPC computers area set of software and hardware standards that was developed by the consortium of computer firms which is led by Microsoft. It contains the address of a next microcode for the Mic1 emulator foe execution.

The part of the executing microcode instruction that determines the value which is placed in the MOC is the MAR bit. The MAR is the memory address register in the CPU which stores the memory address or such addresses to which some data will be sent and also stored.

What is the full form of 'Rom

Answers

Answer:

Read-only memory

Explanation:

Read-only memory is a type of non-volatile memory used in computers and other electronic devices. Data stored in ROM cannot be electronically modified after the manufacture of the memory device.

why is an increase in tax rate not necessarily increase government revenue​

Answers

Answer:

An increase in tax rate raises more revenue than is lost to offsetting worker and investor behavior

Explanation:

Increasing rates beyond T* however would cause people not to work as much or not at all, thereby reducing total tax revenue

Write a SELECT statement that returns these columns from the Orders table: The CardNumber column The length of the CardNumber column The last four digits of the CardNumber columnWhen you get that working right, add the column that follows to the result set. This is more difficult because the column requires the use of functions within functions. A column that displays the last four digits of the CardNumber column in this format: XXXX-XXXX-XXXX-1234. In other words, use Xs for the first 12 digits of the card number and actual numbers for the last four digits of the number.selectCardNumber,len(CardNumber) as CardNumberLegnth,right(CardNumber, 4) as LastFourDigits,'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumberfrom Orders

Answers

Answer:

SELECT

CardNumber,

len(CardNumber) as CardNumberLength,

right(CardNumber, 4) as LastFourDigits,

'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumber

from Orders

Explanation:

The question you posted contains the answer (See answer section). So, I will only help in providing an explanation

Given

Table name: Orders

Records to select: CardNumber, length of CardNumber, last 4 digits of CardNumber

From the question, we understand that the last four digits should display the first 12 digits as X while the last 4 digits are displayed.

So, the solution is as follows:

SELECT ----> This implies that the query is to perform a select operation

CardNumber, ---> This represents a column to read

len(CardNumber) as CardNumberLength, -----> len(CardNumber) means that the length of card number is to be calculated.

as CardNumberLength implies that an CardNumberLength is used as an alias to represent the calculated length

right(CardNumber, 4) as LastFourDigits, --> This reads the 4 rightmost digit of column CardNumber

'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumber --> This concatenates the prefix XXXX-XXXX-XXXX to the 4 rightmost digit of column CardNumber

as FormattedNumber implies that an FormattedNumber is used as an alias to represent record

from Orders --> This represents the table where the record is being read.

what is secondary memory?

Answers

Answer:

Secondary memory refers to storage devices, such as hard drives and solid state drives. It may also refer to removable storage media, such as USB flash drives, CDs, and DVDs. ... Additionally, secondary memory is non-volatile, meaning it retains its data with or without electrical power.

# 1) Complete the function to return the result of the conversion
def convert_distance(miles):
km = miles * 1.6 # approximately 1.6 km in 1 mile

my_trip_miles = 55

# 2) Convert my_trip_miles to kilometers by calling the function above
my_trip_km = ___

# 3) Fill in the blank to print the result of the conversion
print("The distance in kilometers is " + ___)

# 4) Calculate the round-trip in kilometers by doubling the result,
# and fill in the blank to print the result
print("The round-trip in kilometers is " + ___)

Answers

Answer:

See explanation

Explanation:

Replace the ____ with the expressions in bold and italics

1)          return km

 

return km returns the result of the computation

2)  = convert_distance(my_trip_miles)

convert_distance(my_trip_miles) calls the function and passes my_trip_miles to the function

3)  + str(my_trip_km)

The above statement prints the returned value

4)  +str(my_trip_km * 2)

The above statement prints the returned value multiplied by 2

The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the file is the following: Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period. The report should be in tabular forma

Answers

Answer:

In Python:

fname = input("Filename: ")

a_file = open(fname)

lines = a_file.readlines()

print("Name\t\tHours\t\tTotal Pay")

for line in lines:

eachline = line.rstrip(" ")

for cont in eachline:

 print(cont,end="\t")

print()

Explanation:

This prompts the user for file name

fname = input("Filename: ")

This opens the file

a_file = open(fname)

This reads the lines of the file

lines = a_file.readlines()

This prints the header of the report

print("Name\t\tHours\t\tTotal Pay")

This iterates through the content of each line

for line in lines:

This splits each line into tokens

eachline = line.rstrip(" ")

This iterates through the token and print the content of the file

for cont in eachline:

 print(cont,end="\t")

print()

What may make it easy for cybercriminals to commit cybercrimes? Select 2 options.

Cybercrimes are not classified as real crimes, only as virtual crimes.

They operate from countries that do not have strict laws against cybercrime.

They are not physically present when the crime is committed.

The United States has no law enforcement that acts against them.

Law enforcement agencies lack the expertise to investigate them.

Answers

Answer: They operate from countries that do not have strict laws against cybercrime.

They are not physically present when the crime is committed.

Explanation:

edg

Answer:

They operate from countries that do not have strict laws against cybercrime.

They are not physically present when the crime is committed.

Explanation:

All operations used to construct algorithms belong to one of three categories: sequential, conditional, or iterative. Below is a list of steps from a variety of algorithms. Determine which category to which each of the steps belong (sequential, conditional, or iterative). If the value of test_grade is between 90 and 100, assign a letter grade of A.
Prompt the user for a number, get number from user
Sequential Repeat steps 3-5 until count = 10
If divisor = 0, print error_message
Complete step 1, complete step 2, complete step 3

Answers

Answer:

Answered

Explanation:

1) Conditional category because it uses an IF statement: If value of test grade is between 90-100 assign A.

2) Sequential category: Prompt user for number and get number from user.

3) Iterative category because it is looping: Repeat steps 3-5 until count equals 10.

4)Conditional category: If divisor equals zero print error.

5) Sequential category.

Under which command group will you find the options to configure Outlook rules?
O Move
O New
O Quick Steps
O Respond

Answers

Answer:

Move

Explanation:

I hope that helps :)

Answer:

a). move

Explanation:

edge 2021 <3

what is the address of the first SFR (I/O Register)​

Answers

Answer:

The Special Function Register (SFR) is the upper area of addressable memory, from address 0x80 to 0xFF.

Explanation:

The Special Function Register (SFR) is the upper area of addressable memory, from address 0x80 to 0xFF.

Reason -

A Special Function Register (or Special Purpose Register, or simply Special Register) is a register within a microprocessor, which controls or monitors various aspects of the microprocessor's function.

Which of the following is step two of the Five-Step Worksheet Creation Process?

Answers

Answer:

Add Labels.

As far as i remember.

Explanation:

Hope i helped, brainliest would be appreciated.

Have a great day!

   ~Aadi x

Add Labels is step two of the Five-Step Worksheet Creation Process. It helps in inserting the data and values in the worksheet.

What is label worksheet in Excel?

A label in a spreadsheet application like Microsoft Excel is text that offers information in the rows or columns around it. 3. Any writing placed above a part of a chart that provides extra details about the value of the chart is referred to as a label.

Thus, it is Add Labels

For more details about label worksheet in Excel, click here:

https://brainly.com/question/14719484

#SPJ2

Define and use in your program the following functions to make your code more modular: convert_str_to_numeric_list - takes an input string, splits it into tokens, and returns the tokens stored in a list only if all tokens were numeric; otherwise, returns an empty list. get_avg - if the input list is not empty and stores only numerical values, returns the average value of the elements; otherwise, returns None. get_min - if the input list is not empty and stores only numerical values, returns the minimum value in the list; otherwise, returns None. get_max - if the input list is not empty and stores only numerical values, returns the maximum value in the list; otherwise, returns None.

Answers

Answer:

In Python:

def convert_str_to_numeric_list(teststr):

   nums = []

   res = teststr.split()

   for x in res:

       if x.isdecimal():

           nums.append(int(x))

       else:

           nums = []

           break;

   return nums

def get_avg(mylist):

   if not len(mylist) == 0:

       total = 0

       for i in mylist:

           total+=i

       ave = total/len(mylist)

   else:

       ave = "None"

   return ave

def get_min(mylist):

   if not len(mylist) == 0:

       minm = min(mylist)

   else:

       minm = "None"

   return minm

def get_max(mylist):

   if not len(mylist) == 0:

       maxm = max(mylist)

   else:

       maxm = "None"

   return maxm

mystr = input("Enter a string: ")

mylist = convert_str_to_numeric_list(mystr)

print("List: "+str(mylist))

print("Average: "+str(get_avg(mylist)))

print("Minimum: "+str(get_min(mylist)))

print("Maximum: "+str(get_max(mylist)))

Explanation:

See attachment for complete program where I use comment for line by line explanation

Is there SUM in Small basic? ​

Answers

Answer:

no

Explanation:

What will happen if there is no reply to the email confirmation?

A.The account will not be activated
B.The account will be Activated
C.The screen will display the message registration form available
D. The screen will display the message registration form unavailable

Answers

Answer:

A. the account will not be activated

Write a program that prompts the user to enter two positive integers less than 1,000,000,000 and the program outputs the sum of all the prime numbers between the two integers. Two prime numbers are called twin primes, if the difference between the two primes is 2 or -2. Have the program output all the twin primes and the number of twin primes between the two integers.

Answers

Answer:

In Python:

low = int(input("Low: "))

high = int(input("High: "))

if low >= 1000000000 or high >=1000000000:

   print("Out of range")

else:

   mylist = []

   for num in range(low,high+1):

       flag = False

       if num > 1:

           for i in range(2, num):

               if (num % i) == 0:

                   flag = True

                   break

       if not flag:

           mylist.append(num)

           print(num, end = " ")

   print()

   print("The twin primes are: ",end="")

   count = 0

   for i in range(1,len(mylist)):

       if mylist[i] - mylist[i-1] == 2:

           print(str(mylist[i])+" & "+str(mylist[i-1]),end=", ")

           count+=1

   print()

   print("There are "+str(count)+" twin primes")

Explanation:

See attachment for complete program where comments were used to explain each line

Write a recursive method called lengthOfLongestSubsequence(a, b) that calculates the length of the longest common subsequence (lcs) of two strings. For example, given the two strings aaacommonbbb and xxxcommonzzz the lcs is common which is 6 characters long so your function would return 6. The length of the lcs of two strings a

Answers

Answer:

Explanation:

The following code is written in Java and creates the recursive function to find the longest common substring as requested.

 static int lengthOfLongestSubsequence(String X, String Y) {

       int m = X.length();

       int n = Y.length();

       if (m == 0 || n == 0) {

           return 0;

       }

       if (X.charAt(m - 1) == Y.charAt(n - 1)) {

           return 1 + lengthOfLongestSubsequence(X, Y);

       } else {

           return Math.max(lengthOfLongestSubsequence(X, Y),

                   lengthOfLongestSubsequence(X, Y));

       }

   }

steps on how to install a mouse​

Answers

Answer:

Verify that the mouse you're thinking of purchasing is compatible with your laptop model. ...

Plug the mouse's USB cable into the matching port on the side of your laptop.

Restart your computer while the mouse is connected. ...

Move your mouse a few times to confirm that the cursor responds.

1) Plug in your mouse's receiver.

2) Make sure that your mouse has batteries or is charged.

3) Turn on your mouse.

4) Press your mouse's "Connect" button.

5) Move your mouse around to test the connection.


Hope that helps.

Open excel program then use the (IF) function to fill the column of (Expensive/Cheap) then save your

I need help in this computer homework send me it as excel

Answers

Answer:

(7,6)12>34=Mc²

Explanation:

AB

MA

B

F

с

AAB=BC,AM=MC

BM IAC , EF I BC

You are working for a company that is responsible for determining the winner of a prestigious international event, Men’s Synchronized Swimming. Scoring is done by eleven (11) international judges. They each submit a score in the range from 0 to 100. The highest and lowest scores are not counted. The remaining nine (9) scores are averaged and the median value is also determined. The participating team with the highest average score wins. In case of a tie, the highest median score, among the teams that are tied for first place, determines the winner.
Scoring data is be provided in the form of a text file. The scoring data for each team consists of two lines; the first line contains the team name; the second line contains the eleven (11) scores. You will not know ahead of time how many teams will participant. Your program will:
Prompt the user for the name and location of the scoring data file.
Process the sets of records in the file.
Read and store the team name in a string variable.
Read and store the scores in an array.
Display the team name followed by the complete set of scores on the next line.
Calculate and display to two decimal places the average of the nine qualifying scores, dropping the lowest and highest scores.
Determine and display the median value among the qualifying scores.
Display the count of the number of participating teams.
Display the winning team name and their average score. Indicate if they won by breaking a tie with a higher median score value.
A sample data file has been provided to allow you to test your program before submitting your work. Records in the sample data file look like this:
Sea Turtles
11 34 76 58 32 98 43.5 87 43 23 22
Tiger Sharks
85 55 10 99 35 5 65 75 8 95 22
The Angry Piranhas
30 10 80 0 100 40 60 50 20 90 70
The average score for the Sea Turtles was 46.5. The Angry Piranhas and the Tiger Sharks both had an average score of 50.0. The tiger sharks had a median value of 55.0, making them the winners of the competition.
You will define and use at least one function in your solution. As a suggestion, you should consider calling a function that sorts the array of judge’s score values into ascending order (lowest to highest). The advantage of doing this is that after being sorted, the lowest value is the first entry in your array and the highest value is the last entry in your array.
The average or arithmetic mean is a measure of central tendency. It is a single value that is intended to represent the collection of values. For this problem, you will only use nine of the values to determine the average. You will not include the highest score and the lowest score.
The median is another measure of central tendency. The median is often referred to as the middle value. In a set of values, half the values are less than the median and the other half are greater than the median. In a sorted array of five elements, the median is the third element. There are two values that are less then it and there are two values that are greater than it. In a sorted array of six values, the median is the simple average of the third and fourth values. In some cases, the median is a better representative value than the average.
You are encouraged to read the article entitled "Mixing getline with cin".
To receive full credit for this programming assignment, you must:
Use the correct file name.
Submit a program that executes correctly.
Interact effectively with the user.
Grading Guideline:
Correctly name the file submitted.
Create a comment containing the student’s full name.
Document the program with other meaningful comments.
Prompt the user for a file name and location.
Open, read, and process all the data in the input file.
Store the judge’s scores in an array.
Correctly display the team name and all scores.
Calculate and display the average score correctly.
Calculate and display the median score correctly.
Correctly count and display the number of competing teams.
Correctly determine and display the winning team and score.

Answers

Answer:

my sql

Explanation:

try with mysql

and database build

Consider the following code: x = 9 y = -3 z = 2 print ((x + y) * z) What is output?

Answers

The answer will be 3

__________ type of storage is very popular to store music, video and computer programs.
i am doing my homework plzz fast​

Answers

Answer:

Optical storage devices.

Explanation:

Optical storage device are those devices that read and store data using laser. To store data in optical storage devices low-power laser beams are used. It is a type of storage that stores data in an optical readability medium.

Examples of the optical storage device includes Compact disc (CD) and DVD.

The optical storage device is popular in storing data of music, videos, and computer program. Therefore, the optical storage device is the correct  answer.

which type of secondary storage has a fast reading access among the secondary storage​

Answers

Answer:

RAM provides much faster accessing speed to data than secondary memory. By loading software programs and required files into primary memory(RAM), computer can process data much more quickly. Secondary Memory is slower in data accessing. Typically primary memory is six times faster than the secondary memory.

What techniques overcome resistance and improve the credibility of a product? Check all that apply.
Including performance tests, polls, or awards
Listing names of satisfied users
Sending unwanted merchandise
Using a celebrity name without authorization

Answers

Answer: Including performance tests, polls, or awards.

Listing names of satisfied users

Explanation:

For every business, it is important to build ones credibility as this is vital on keeping ones customers and clients. A credible organization is trusted and respected.

The techniques that can be used to overcome resistance and improve the credibility of a product include having performance tests, polls, or awards and also listing the names of satisfied users.

Sending unwanted merchandise and also using a celebrity name without authorization is bad for one's business as it will have a negative effect on the business credibility.

17. Ano ang tawag sa pahina ng Excel?
a. Column
b. Columnar
c. Sheet page
d. Spread sheet​

Answers

D

Explanation:

D.spread sheet

........,,............:-)

A (n) ___ system can help a business alleviate the need for multiple information systems.

Answers

Answer:

Enterprise Resource Planning

Explanation:

ERP

A disk has 4000 cylinders, each with 8 tracks of 512 blocks. A seek takes 1 msec per cylinder moved. If no attempt is made to put the blocks of a file close to each other, two blocks that are logically consecutive (i.e. follow one another in the file) will require an average seek, which takes 5 msec. If, however, the operating system makes an attempt to cluster related blocks, the mean interblock distance can be reduced to 2 cylinders and the seek time reduced to 100 microsec. How long does it take to read a 100 block file in both cases, if the rotational latency is 10 msec and the transfer time is 20 microsec per block

Answers

Answer:

The answer is below

Explanation:

a)

If the blocks of a file are not put together, that is for nonadjacent block of files to each other, the time (t) taken to read a 100 block file is:

t = (average seek + rotational latency + transfer time) * 100 block

Average seek = 5 msec, rotational latency = 10 msec and transfer time = 20 microsec = 0.02 msec

t = (5 + 10 + 0.02) * 100 = 1502 msec

b)

If the blocks of a file are put together, that is for adjacent block of files to each other, the time (t) taken to read a 100 block file is:

t = (seek time * mean interblock distance + rotational latency + transfer time) * 100 block

seek time = 100 microsec = 0.1 msec, rotational latency = 10 msec and transfer time = 20 microsec = 0.02 msec, mean interblock distance = 2 cylinders

t = (0.1*2 + 10 + 0.02) * 100 = 1022 msec

Other Questions
PLEASE ANSWER ASAP WILL MARK BRAINLIEST!! Match the phrase with the appropriate mindset component.1. understanding that you may gain weight at Christmas time2. beginning a resistance program without using any additional weight3. changing how long you run after a foot injury4. adding only 1 pound hand weights after a resistance exercise seems too easy5. understanding that you'll still be exercising in five years6. deciding what you'll specifically gain from your exercise routine this monthA. feedbackB. correct intensity levelC. progress incrementallyD. goal makingE. lifelong processF. accept set-backs 2/3 feet into inches The data set below representsthe high temperature of 10cities on a certain day:{68, 73, 95, 81, 85,90, 77, 84, 75, 92}What is the mean?Ms. GuelMr. LeA) 85B) 86C) 83D) 80E) 82Mr. StaufferMrs. EmreyMs. FialaGina Wilson Athias Abrol. 2014 Jim is saving nickels, dimes and quarters to buy a baseball mitt. He has 12 moredimes than quarters, and 8 fewer nickels than twice the number of quarters. The totalamount he has saved is $17.00. What number of each kind of coin he has A trapezoid has a base of 5cm, a height of 4cm. What is the area? Find the value of the marked angles in each of the following ( see image ). Please show workings. The only given angle is 126.The angle to look for is marked by )) Given the punctuation, how should Julie deliver her lines? HELP PLEASE WILL GIVE BRAINLIST Which change does not increase the speed of reaction between zinc and hydrochloric acid? Can yall help with 1-3? Use the distributive property to remove the parentheses. - ( 3y - 2u - 2)Thank youthe best answer will get brainliest QUESTION 1 / 10Revenue is:A. The amount of money a company makes from sales.B. The amount of money a company pays its employees.C. The amount of money a company has left over afterpaying bills.D. The amount of taxes a company has to pay.Type here to searchBI1:01 PM3/28/2021 The area of a circle is 100 pi ft2. What is the circumference, in feet? Express youranswer in terms of pi Fatima opened a savings account with $7,500. She decided to deposit that same amount semiannually. This account earns 3.975% interest compounded semiannually. Exercises 5-7 are about Fatima's account. 5. What is the future value of the account after 10 years? PLS HELP IM TIMED!!! Example: What time is in France?It is ten sixteen.What time is it now?It is......What time is your English class?What time is it in New York? Jimbo has been putting spare change in a jar for a month. He has collected a total of117 coins. In one jar he has pennies and in another jar he has quarters. He added themup and found he had $17.25. How many quarters did he have? Tell me 3 inspiration things about Christa McAuliffe 8. List the word that comes after the word dictionary in a dictionary: list the seven reasons for judging a case uncertworthy