Community Profile # James Zheng

15 2019 年以降の合計貢献数

#### James Zheng's バッジ

Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

7ヶ月 前

Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

7ヶ月 前

Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

7ヶ月 前

Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

7ヶ月 前

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

7ヶ月 前

Is my wife right?
Regardless of input, output the string 'yes'.

7ヶ月 前

What percentage?
Calculate the output c as the percentage of a on b for given a and b.

7ヶ月 前

Times 3 problem
When you enter the number, it should return the number multiplied by 3

7ヶ月 前

Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

7ヶ月 前

Return area of square
Side of square=input=a Area=output=b

7ヶ月 前

Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

7ヶ月 前

Given a and b, return the sum a+b in c.

7ヶ月 前

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

7ヶ月 前

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

7ヶ月 前

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

7ヶ月 前