Class Notes (835,600)
Canada (509,275)
CSCA20H3 (25)

SUMMARY chap 2.docx

16 Pages
Unlock Document

Computer Science
Benj Hellie

SUMMARY chap 2 492012 75500 AM What are the hardwareProcessorexecute instrucitons and do arithmetic Hard driveOperating systemallow direct access to the heardware Only writing on the OS When write a program on python it run to the interpreter or the virtual mathcine first and let the program run for you Pythono Run a shell that reads commands from the keyboardexecute what it ask and show the output as textin one windowo A modern way to inteact with python is through IDEintegrated development environement Expression in python Statementthey are python commandso One kind of this is called expression statement or expressionSuch as 34 Operatorsand values Python doesnt round intergrer expression so 1710 is not 2 but 1 How to get a float ofloat1710 o 17 o or 17010operator precedenceohave a higher precedence thanhence evalucated beforewe can order the precedence by using parentheses around the parts of the expressionin pytgonm eans assignavalue to o so a2a is allowable in python when a variablesay a appear o both sides of the assignment statementie withthen you can use shorthand notation fo rthie operation number 80 Functiono Know the difference between parameter and argumentthe actual values The backslash is escape charactero Signals the start of an excape sequenceo Use n to indicate a newline PRINTo A print statement takes a commaseparated list of items to print and displays them on a line of their ownConversion sepecifiero farea31415955print The area of the circle is f sq cmarea why do we do this Why not just type the area of the circle is area cmcause in python whatever comes in side the qyote doesnt change even though you change the value of the parametes examplexrawinputtype hereprinthello laura is xprint hello laura isxprint hello laura is sxyour answer ishello laura is xhello laura is 100hello laura is 100so in order to print a mixture of unchanged and change values you can use the latter two method Method 1 type the variable separeately outside the quote
More Less

Related notes for CSCA20H3

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.