Resuelto


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some str...

más de 8 años hace

Resuelto


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

más de 8 años hace

Resuelto


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

más de 8 años hace

Resuelto


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

más de 8 años hace

Resuelto


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

más de 8 años hace

Resuelto


04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...

más de 8 años hace

Resuelto


Celcius to Kelvin
Convert Celsius degrees to Kelvin temperature.

más de 8 años hace

Resuelto


Rounding
Round 10.67 and make 'y' equal to that number.

más de 8 años hace

Resuelto


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

más de 8 años hace

Resuelto


03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

más de 8 años hace

Resuelto


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

más de 8 años hace

Resuelto


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

más de 8 años hace

Resuelto


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

más de 8 años hace

Resuelto


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

más de 8 años hace

Resuelto


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

más de 8 años hace

Resuelto


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

más de 8 años hace

Resuelto


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator. Ex: If endLetter = 'e', then alphaSt...

más de 8 años hace

Resuelto


Logical operators and arrays: 3-input and truth table
Given 3 inputs (inputA, inputB, inputC), assign threeInputAnd with the truth table outcomes for a 3 variable logical-and operati...

más de 8 años hace

Resuelto


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

más de 8 años hace

Resuelto


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

más de 8 años hace

Resuelto


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

más de 8 años hace

Resuelto


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds. Ex: If runTimes =...

más de 8 años hace

Resuelto


Multiple element-wise operations: Percent change
Row arrays sales2013 and sales2014 reflect the quarterly sales (in millions) of a popular potato chip company. Write a statement...

más de 8 años hace

Resuelto


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...

más de 8 años hace

Resuelto


Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

más de 8 años hace

Resuelto


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the colon operator. * Transpose countValues to result in...

más de 8 años hace

Resuelto


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 ...

más de 8 años hace

Resuelto


Adding an element: Ticker tape
* Add stockPrice to the beginning of row array tickerTape

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Cargar más