Community Profile

# Seth Leeper

### University of Pittsburgh

90 total contributions since 2016

View details...

Contributions in
View by

Solved

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

meer dan 3 jaar ago

Solved

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

meer dan 3 jaar ago

Solved

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

meer dan 3 jaar ago

Solved

Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

meer dan 3 jaar ago

Solved

Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

meer dan 3 jaar ago

Solved

Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

meer dan 3 jaar ago

Solved

Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

meer dan 3 jaar ago

Solved

The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

meer dan 3 jaar ago

Solved

Calculate the sum of two numbers. Example input = [2 3] output = 5

meer dan 3 jaar ago

Solved

Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

meer dan 3 jaar ago

Solved

Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

meer dan 3 jaar ago

Solved

Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

meer dan 3 jaar ago

Solved

Generate pi using logarithm
Generate pi using logarithm

meer dan 3 jaar ago

Solved

give nth decimal place of pi
max 15th place after the decimal point is ok for now

meer dan 3 jaar ago

Solved

Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

meer dan 3 jaar ago

Solved

Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

meer dan 3 jaar ago

Solved

Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

meer dan 3 jaar ago

Solved

Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

meer dan 3 jaar ago

Solved

Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

meer dan 3 jaar ago

Solved

Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

meer dan 3 jaar ago

Solved

Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

meer dan 3 jaar ago

Solved

grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

meer dan 3 jaar ago

Solved

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

meer dan 3 jaar ago

Solved

find the Area of a rectangle
length is x width is y what is the area of the rectangle?

meer dan 3 jaar ago

Solved

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

meer dan 3 jaar ago

Solved

Find the area of a rectangle if length of the diagonal is given.
if length of a diagnonal in rectangle is 5. Its area is 12.

meer dan 3 jaar ago

Solved

Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

meer dan 3 jaar ago

Solved

Area of a disk
Find the area of a disk or circle. x= radius of the disk.

meer dan 3 jaar ago

Solved

Area of a circle
Find the value for area of the circle if diameter is given

meer dan 3 jaar ago

Solved

Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

meer dan 3 jaar ago