Community Profile

photo

Seth Leeper


University of Pittsburgh

90 total contributions since 2016

Contact

Seth Leeper's Badges

  • CUP Challenge Master
  • Solver

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

3 years ago

Solved


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

3 years ago

Solved


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

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

3 years 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

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

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

3 years 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".

3 years ago

Solved


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

3 years 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];

3 years 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

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

3 years ago

Solved


Generate pi using logarithm
Generate pi using logarithm

3 years ago

Solved


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

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

3 years 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!

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

3 years ago

Solved


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

3 years ago

Solved


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

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

3 years ago

Solved


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

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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

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

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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Load more