Show Menu
Cheatography

Computer Programming Final Review Cheat Sheet (DRAFT) by

MENG 2020 - SEMESTER 3 - HUMBER COLLEGE - MECHATRONICS ENGINEERING

This is a draft cheat sheet. It is a work in progress and is not finished yet.

BASIC THINGS

fabs(x)
absolute value of x
sqrt(x)
square root of x
pow(x,y)
x to the power of y
sin(x)
sine of x (radians)
ceil(x)
round x toward positive infinity
cos(x)
cosine of x (radians)
floor(x)
round x toward negative inifinity
pi and e
predefined values

Arithmetic Operators

print(­'x+y=', x+y)
addition
print(­'x-y=', x-y)
subtra­ction
print('xy=', xy)
multip­lic­ation
print(­'x/y=', x/y)
division
print(­'x^y=', x**y)
expone­nti­ation (use x**y instead of x^y)