Sure. I don't know Objective C, but it is reportedly a superset of C (unlike C++) such that every legal C program is also legal Objective C program.
C functions look much like your main() function. Define them before use and you won't have to use prototypes.
Note: The square function should be side**2 if you want area, or side*4 if you want perimiter, but side**4 is an oops! Also, C does not have an exponentiation operator (** in Python) so you perform small integer powers by multiplying
double square(double side) /* Python: def square(side): */
{
return side*side; /* Python: return side**2 */
}
C is strongly-typed so you must declare the data types for both arguments and the return value.
Second note: Python's return statement is a statement, not a function, so you don't need parentheses around values. The same is true for C, though you will see a lot of code, particularly old Unix code, using return(0); instead of return 0;. Speaking of parentheses, you do need them in your trapezoid area calcuation (both C and Python versions) to add a and b before dividing and then multiplying: (a+b)/2*h.
I will sometimes write simple expression functions like this as one-liners:
double trapezoid(double a, double b, double h) { return (a+b)*0.5*h; }
Multiplying by 0.5 is faster than division by 2. Also, "double" is the C type corresponding to "float" in Python. There is a "float" type in C, but avoid it unless you have a Real Good Reason not to use double.