Risolto


Logic variables
* Assign isAvailable with true.

oltre 11 anni fa

Risolto


Declaring a string
* Assign streetAddress with the string 1313 Mockingbird Lane.

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Declaring a character
* Assign middleInitial with the character T.

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Compute total cost
A drink costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the num...

oltre 11 anni fa

Risolto


Write an expression
Assigns finalResult with firstSample plus secondSample, divided by 3. Ex: If firstSample is 18 and secondSample is 12, finalResu...

oltre 11 anni fa

Risolto


Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

oltre 11 anni fa

Risolto


Fahrenheit to Celsius using multiple statements
°C = (°F - 32) x 5/9 * Write a statement that assigns fractionalMultiplier with 5/9. * Write a second statement that assign...

oltre 11 anni fa

Risolto


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

oltre 11 anni fa

Risolto


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...

oltre 11 anni fa

Risolto


Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

oltre 11 anni fa

Risolto


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

oltre 11 anni fa

Risolto


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

oltre 11 anni fa

Risolto


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

oltre 11 anni fa

Risolto


Filter values in a vector
Cody often benefits from a functional style of programming. For example, your score is often better when you compose multiple fu...

oltre 11 anni fa

Risolto


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

oltre 11 anni fa

Risolto


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

oltre 11 anni fa

Problema


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

oltre 11 anni fa | 3 | 135 risolutori

Risolto


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

oltre 11 anni fa

Risolto


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

oltre 11 anni fa

Risolto


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

oltre 11 anni fa

Risolto


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

oltre 11 anni fa

Risolto


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

oltre 11 anni fa

Risolto


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

oltre 11 anni fa

Risolto


Find the position of last minimum value in an integer array with numbers
If x = [2 6 4 9 -10 3 1 5 -10] then the output should be 9, because last minimum value (-10) lies at the 9th position.

oltre 11 anni fa

Risolto


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

oltre 11 anni fa

Risolto


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

oltre 11 anni fa

Risolto


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

oltre 11 anni fa

Risolto


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

oltre 11 anni fa

Carica altro