已解决


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

8 years 前

已解决


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

8 years 前

已解决


Extracting data: Heart rate (pulse)
The resting heart rate for an average adult is 60 - 100 beats per minute. Assign row array heartExtracted with all values in row...

8 years 前

已解决


Function call in expression: Reduced pricing.
Write a single statement that assigns cartTotal with the discounted cost of items 1 and 2. Function DiscountedPrice will return ...

8 years 前

已解决


only input
Return the output without writing any code into the function.

8 years 前

已解决


Variable sized row arrays
* Reverse the contents of row array mileMarkers

8 years 前

已解决


Logic array: Identifying qualifying times
Create a logic array qualifyingIndex with true for any location where the runner is male with a running time less than 8.2. Row ...

8 years 前

已解决


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

8 years 前

已解决


Integer indexing array: Reverse subsets
Construct an indexing array copySubset so that the statement reversedOrder = origOrder(copySubset); results in a row array begin...

8 years 前

已解决


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

8 years 前

已解决


Indexing the array: Moving values
Assume sampleReadings always contains three elements. * Shift the array contents one position to the left. * The rightmost ...

8 years 前

已解决


Relational operators and row arrays: Overweight baggage
Create a logical indexing array overweightBaggage with true in each location where the corresponding baggageWeight is greater th...

8 years 前

已解决


Element-wise division
* Assign row array weightKilo with the corresponding weight in kilograms. Use the following conversion: kg = lb / 2.2

8 years 前

已解决


Logical indexing: High scores
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than 5...

8 years 前

已解决


Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...

8 years 前

已解决


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

8 years 前

已解决


Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in attendanceV...

8 years 前

已解决


Double colon operator: Counting down
* Construct a row array countValues from startValue to endValue, elements decremented by -2 Ex: If startValue is 10 and end...

8 years 前

已解决


Multi-line comments
* Fix the syntax errors.

8 years 前

已解决


Indexing an array element
* Assign currentStudent with the second element of array testScores. _Reminder: Array indexing starts with 1._

8 years 前

已解决


Double colon operator: Counting up
* Construct a row array countValues from 1 to endValue, using the double colon operator. Ex: If endValue is 5, countValues s...

8 years 前

已解决


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

8 years 前

已解决


Coordinate geometry
Assign pointsDistance with the distance between point (x1, y1) and point (x2, y2). The distance is calculated by: Distance =...

8 years 前

已解决


Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

8 years 前

已解决


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

8 years 前

已解决


Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

8 years 前

已解决


Comments
* Fix the syntax errors.

8 years 前

已解决


Indexing the last element: Print queue
* Delete the last element of row array printQueue.

8 years 前

已解决


Population growth
Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The fi...

8 years 前

已解决


Character variable: Compass direction
* Assign compassDirection with sensorReading's value. Both are character variables.

8 years 前

加载更多