Gelöst


How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

mehr als 2 Jahre vor

Gelöst


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

mehr als 2 Jahre vor

Gelöst


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

mehr als 2 Jahre vor

Gelöst


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

mehr als 2 Jahre vor

Gelöst


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

mehr als 2 Jahre vor

Gelöst


Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...

mehr als 2 Jahre vor

Gelöst


Matrix Quadrants
Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...

mehr als 2 Jahre vor

Gelöst


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

mehr als 2 Jahre vor

Gelöst


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

mehr als 2 Jahre vor

Gelöst


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

mehr als 2 Jahre vor

Gelöst


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

mehr als 2 Jahre vor

Gelöst


06 - Matrix Equations 1
Define the vectors _aVec_ and _bVec_ and the matrix _aMat_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http:/...

mehr als 2 Jahre vor

Gelöst


The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

mehr als 2 Jahre vor

Gelöst


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

mehr als 2 Jahre vor

Gelöst


Sum of series VIII

mehr als 2 Jahre vor

Gelöst


kmph to mps
convert kilometer per hour to meter per second

mehr als 2 Jahre vor

Gelöst


Sum of series IX
What is the sum of the following sequence: Σ 1/k! for k=1...n for different n?

mehr als 2 Jahre vor

Gelöst


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

mehr als 2 Jahre vor

Gelöst


string comparision
compare two strings if both are same return 1 else return 0

mehr als 2 Jahre vor

Gelöst


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

mehr als 2 Jahre vor

Gelöst


Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

mehr als 2 Jahre vor

Gelöst


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

mehr als 2 Jahre vor

Gelöst


Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15. Given a temperature in Kelvin, return the equivalent temperature in Celsius.

mehr als 2 Jahre vor

Gelöst


lb to kilogram
convert lb to kilogram units, easy

mehr als 2 Jahre vor

Gelöst


Replace all odd numbers with NaN
Replace all odd numbers in the vector or matrix with NaN. For example, if x = [1 3 4 5 8 11]; then return y = [NaN Na...

mehr als 2 Jahre vor

Gelöst


Create a "+" flag
Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

mehr als 2 Jahre vor

Gelöst


odd number odd sum
How many three digit numbers are there whose sum of the digits is odd?

mehr als 2 Jahre vor

Gelöst


String Delimination and Outputting
In this problem, take an incoming string and deliminate the string based on spaces. Output the first string in between the space...

mehr als 2 Jahre vor

Gelöst


SAY 'OHYEAH'
Regardless of input, output the string 'OHYEAH'.

mehr als 2 Jahre vor

Gelöst


Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle, outp...

mehr als 2 Jahre vor

Mehr laden