Problem 167. Pizza!
Solution Stats
Last 200 Solutions
Problem Comments
-
299 Comments
-
299 Comments
"Non-scored bonus question: Why is the function interesting?"
- Because the question is in the answer, as long as you do not go for the shortest one.
You can calculate the most value for your money!
This made me laugh more than I care to admit...
Awesome. FWIW, I call foul on the solutions that use Neural Network toolbox - isn't Cody supposed to not use toolboxes?
Why is the function interesting ?
pi_z_z_a ... that's why ... :D
Lol, very nicely done :)
Definitely one of my favorites ;)
PIZZA!!
Kawabanga
You genious :)
Very funny problem with a tasty solution!
made me smile
ha ha ha, soooo funny
Classic!
:)
Nicely apt answer :)
:)
Nice one! I need to go buy the shirt now.
bit tricky
Well served!
Lol that's hilarious... the volume is two pies
pi*z*z*a
Because y = pi*z*z*a
y = pi*z*z*a
pi*z*z*a
y= pi*z*z*a
y = pi*z*z*a
y = pi*z*z*a
y=pi*z*z*a
y = pi*z*z*a
pi*z*z*a
pi*z*z*a!
Nice question! :)
y=pi*z*z*a
y=pi*z*z*a (:
pi*z*z*a
y = pi*z*z*a
V = pi*z*z*a
v=pi*z^2*a
ans = pi*z*z*a
V = pi*z*z*a
y = pi*z*z*a
because the question does not ask for a formula
A = pi*z*z*a
pi*z*z*a
the volume is equal to: pi*z*z*a
ans= pi*z*z*a
pizza = pi*z*z*a
ans= pi*z*z*a
ans= pi*z*z*a
pi*z^2*a
ans= pi*z*z*a
ans= pi*z*z*a
pi*z*z*a
pi*z*z*a
I didn't get what should I insert there to solve it. Could anybody send me the guidelines to dos_lp | at | mail dot ru
Thanks you!
volume = pi .* z .* z .* a;
pi*z*z*a
volume = pi .* z .* z .* a
volume = pi .* z .* z .* a;
why is my solution wrong?
function y = pizza(z,a)
y = pi*z*z*a
end
y = pi*z*z*a
Usually I get the following response:
"No public property version exists for class cody.verifyCode."
but about the tenth time it finally worked.
Not sure what the issue is but it usually bombs on both MS Edge and Chrome browsers.
ti's ok... y = pi*z*z*a; %
pi*z*z*a
v = pi*z*z*a
pi*z*z*a
pi*z*z*a
pi*z*z*a
pi*zz*a
pi*z*z*a
ans=pi*z*z*a
pi*z*z*a
ans=pi*z*z*a
ans=pi*z*z*a
Volume= pi*z*z*a
ans=pi*z*z*a
ans=pi*z*z*a
Volume= pi*z*z*a :)
ans= Pi*z*z*a
A=Pi*z*z*a
How about z*a*a*pi?
Volume = Pi*z*z*a
Volume = Pi*z*z*a
pi*z*z*a!
syms a, z
volume=pi*z^2*a
pi*z*z*a
V_pizza = Pi*z^2*a;
ans=pi*z*z*a
For Pizzas give one = get one
ans=
pi*z^2*a
pizza
Pizza
pi*(z*z)*a
nom nom :)
pizza
Pizza = pi*z*z*a
-_-
Volume = pi * (z*z)*a
F(z) = pi*(z^2)*a;
pizza=pi*z*z*a.............
pi*z*z*a
ans = pi*z*z*a
pi*z*z*a
pi*z*z*a
delicious= pi*z*z*a;
pi*z*z*a
z*z*a*Pi
z = 1;
a = 1;
v_correct = pi;
assert(isequal(pizza(z,a),v_correct))
pi.z.z.a
Interesting :)
pi*z*z*z
Volume = pi*z*z*a;
pi*z*z*a
Volume = pi*z*z*a
I want some pi*z*z*a
Pi*z*z*a
function [Volume] = findVolume(r,h)
input(radius of pizza is: );
input(thickness of pizza is: );
Volume = pi*r*r*h;
end
% The output "produce" pizza, which got me salivating.
this should be an awesome pi*z*z*a
pi*z*z*a :D
pi*z*z*a :D
V = a*\pi*z^{2}
pi*z*z*a
pi*z*z*a!
pi*z*z*a
pi*z*z*a
pi*z*z*a
F(z)=pi*z*z*a
F(z)=pi*z*z*a
pi*z*z*a
F(z)=pi*z*z*a
pi*z*z*a
pi*z*z*a
Volumeofpizza = pi*z*z*a %This is the volume of a cyclinder (pi*r^2*a)
pi*z*z*a
It's interesting because pi is in pizza and pi*r^2*h is the volume of a cylinder. In this case we are assigning the radius of the pizza with z and the height with a!
pi*z*z*a*
Yummmmm
pizza......nice work!
I am very interested in this Problem.
solution pi*z*z*a
Oww, it is best ...
y=pi*z*z*a
pizza
pi*z*z*a*
pi*z*z*a*
volume = pi*z*z*a
Pi*z*z*a
V = pi*z*z*a
pi*z*z*a
V = pi*z*z*a
V=pi*z*z*a;
*hoho*
V = pi*z*z*a
Could be p*i*z*z*a factorial? (Pizza!)
pizza = pi*z*z*a
I thing that
F = (pi)*(z^2)*a
ans=pi*z*z*a
F = (pi)*(z^2)*a
Pi*zz*a
It is fun as the answer is itself!
%Answer :
function volume = funpizza(z,a)
volume = pi*z*z*a;
end
%Answer:
function volume = funpizza(z,a)
volume = pi*z*z*a;
end
function volume = pizza_volume(z,a) ;
volume = pi*z*z*a;
return;
p*i*z*z*a
function vol = piz(z,a) vol = pi*z*z*a; end
pi*z*z*a!!!
pi*z*z*a
radius=z
th=a
volume=pi*z*z*a
where is my pi*z*z*a
v=pi*z*z*a
ans = pi * z * z * a;
pi*z*z*a
It is fun!
pi*z*z*a
ans= pi*z*z*a
"Pizza!"
pi*z*z*a
ans= pi*z*z*a
Pi*z*z*a
pi*z*z*a
ans = pi * z * z * a
pi * z * z * a
pi*z*z*a
I'm really interested in knowing how to reduce the size of my answer (18).
pi*z*z*a it should be
pi*z*z*a
Pi*z*z*a
pi*z*z*a as it is circular thus, pi*r*r is the area and a is the height/thickness.
pi*z*z*a
F(z)=pi*(z^2)*a;
pi*z*z*a
pi*z*z*a
pi*z*z*a
pi*z*z*a
V = pi*z*z*a
function [V] = pizza(z,a)
V = pi*z*z*a;
end
V = pi*z*z*a
volume = pi*z*z*a;
V=pi*z*z*a
ans = pi*z*z*a
pi*z*z*a
V = pi*z*z*a
ans = pi*(z^2)*a
pi*z^2*a
ans = pi * z * z * a
z = input('Enter the radius of a pizza: ');
a = input('Enter the thickness of a pizza: ');
V=pi*z*z*a
3.14*ztrans(ztrans(a))
ans = pi * z * z * a
V=pi*z*z*a
y = pi*z*z*a
ans = pi*z*z*a
V = pi .* (z .^ 2) .* a;
Volume = pi * z * z * a
ans = pi*z*z*a ..........hahhahahha
Answer:
R=z;
H=a;
V=pi*(R^2)*H;
V = pi .* (z .^ 2) .* a;
V=pi*z^2*a
V=pi*z*z*a
V=pi*z*z*a;
V=pi*z^2*a
V=pi*z*z*a
funtction [V] = pizza_volume(z,a)
V=pi*z^2*a;
end
Funny!!!
y=pi*z^2*a
y= pi*z^2*a
V = pi*z*z*a
y=pi*z^2*a
indeed.
Easy
this's funny
easy
i like these basic questions, they dont really require you to go through the manuals and basic.
interesting question
yay
so i need a piz2a now
good one
nice
nice
Pretty tricky and funny. haha, XD
lol very easy
:)
That was a tough one
nice
My favorite food is pi*z*z*a
Very funny problem!
nice
volum=f(z,a)=(pi*z^2*a)
Tasty solution!!
Pizza!
Just trying to get points...
Doing this for a grade in class.
(Y)
ha ha ha. r become z and h become a.
Very simple and useful example.
great problem!
Haha! Good one!
how to reduce size from 18 to 10?
Nice!!
Just love this one:)
pizza pi! Yum
Took me time to get the joke, since I started with a rounded edge pizza instead of a cylinder.
I got:
Volume = (a*pi*((a/2 - z)^2 + 2*z^2))/3
Technically more accurate, but clearly not as funny as the intended result...
(I suck at math so I had to Google the volume of a barrel shape, and constrain it to : rounding radius = thickness/2, and let the solve function do the algebra for me...)
PIzza
yeah! pi*a*z^2
pi*z^2*a
Ten points for the pun, that's *bad*. ;)
nice
Very Nice Question!
Fun Question and Solution!
ahah nice one
It's a funny question
good
nice problem!!
Great!!!
nice
haha funny one!
The name is the solution!
good!
jajajaja. Now do the same with hamburgers.
Pizza!!!!!!
funny
Fun
Love the problem name!
Didn't see that coming ahah
nice
nice name
Nice One :)
Good problem
cool problem
classic
pi * z *z *a = pizza
pizza
pi*z*z*a = pizza
pi*z*z*a
pi*z*z*a
π*(z^2)*a = pi*z*z*a = pizza
pi*z*z*a
That's why it is called Pizza!
good function review!
good problem!
Pizza!
good
goood
That was a nice pun
good problem
Solution Comments
Show commentsRegistration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025

Group

University of Leeds Cody Competition
- 50 Problems
- 7 Finishers
- Add two numbers
- Find the sum of all the numbers of the input vector
- Maximum value in a matrix
- Return area of square
- Finding Perfect Squares
- Make the vector [1 2 3 4 5 6 7 8 9 10]
- Generate a vector like 1,2,2,3,3,3,4,4,4,4
- Triangle Numbers
- Length of the hypotenuse
- Select every other element of a vector
- Column Removal
- Swap the input arguments
- Swap the first and last columns
- Check if number exists in vector
- Reverse the vector
- Determine whether a vector is monotonically increasing
- Getting the indices from a vector
- Create times-tables
- Return the first and last characters of a character array
- Number of 1s in a binary string
- Make a random, non-repeating vector.
- Magic is simple (for beginners)
- Sum all integers from 1 to 2^n
- Quote Doubler
- De-dupe
- Cell joiner
- Remove all the words that end with "ain"
- Nearest Numbers
- Find state names that start with the letter N
- Word Counting and Indexing
- Given two arrays, find the maximum overlap
- It dseon't mettar waht oedrr the lrettes in a wrod are.
- Counting in Finnish
- Create a figure and plot data
- Plotting Practice
- Jack O'Lantern
- 3D Plots and Colorbars
- Make a Plot with Functions
- Count the number of folds needed to pack a large sheet
- Characterize fluid flow in a pipe as to laminar or turbulent
- Create a matrix map of increasing safety levels
- Sum of Even Fibonacci Numbers
- Create the following sequence : 0 1 1 4 9 25 64 169 ...
- Battery Charge Efficiency Calculation
- Estimating Monthly Electricity Cost for a Household Appliance
- Pizza!
- Pi Digit Probability
- Roll the Dice!
- Triangle sequence
- Birthday cake
Problem Recent Solvers22321
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Players
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)