Study Guides (248,368)
Canada (121,499)
COMP 1405 (5)
all (2)

Notes sheet.docx

2 Pages
Unlock Document

Computer Science
COMP 1405
All Professors

Algorithm provides a detailed set of instructionsAlgorithms can be in a natural language not necessarily programming languagesHave a set of input possibly not similar to ingredientsBody of algorithm is an unambiguous set of instructionsThe instructions cannot be divided further atomicProduces an outcome obvious when doneOutput can be numerical transformation of input look up details from keywords may represent Physical changes eg baking a cakeTheres a distinction between Software and Algorithms which is the termination state toy software does not need to terminateSyntax informs you of what instructions are availableLoopsLoops are statements used to execute commands over and over againCommon loops include while and forIf the loop does not have an end condition then it is an infinite loop and will continue running until there is no more memory accessible resulting in a crashLoops that depend on the mouse pointer produce a subtle bug possibly resulting in an infinite loop Loops should always terminate which can be done by setting up the loop to have a way to terminate such as a variable conditions Eg If the body is testing for i then the value sho
More Less

Related notes for COMP 1405

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.