This website uses cookies to ensure you have the best experience. Learn more

Turing Exam Notes Essay

2043 words - 9 pages

These notes helped me alot in my final exam for ICS3M.Computers Exam NotesTermsDeclaring a variable -setting aside some memory that will be used to store a valueIndentifier -The name of the variableConstants -Declared using: var name-of-constant : type-of-constant :=value. Constants are variables that you want to stay the same through the entire program, they are useful if it's a variable that you may wish to changeVariables -Must begin with a letterCan use digits or underscoresCan't use special characters like hyphens or spacesAre case sensitiveAssignment-Occurs when a variable is assigned a specific value (initialized)Condition/Comparison -Is used when comparing a value/variable to another ...view middle of the document...

Eg. drawfillOval(200,300,100,50,blue)File I/OWhen a text file is read in and used in turingFile input -Open: filenum,filename, putFile OutputOpen: filenum, filename, getArraysArray -An array is a variable that holds an entire list of informationSelection Sort-The selection sort works by using 2 arrays: an unsorted list and a sorted list. The sorted list is empty to start. The sort works by selecting the smallest item from the unsorted list, copying it into the next empty spot in the sorted list, and then changing the element that was just copied to a very large # (larger than all the # that you are working with)Unsorted ListSorted listsmallestlocation9,3,7,2,10-- -- -- -- -- 249,3,7,999,102 -- -- -- -- 32Insertion SortThe insertion sort uses 2 arrays (just like the selection) but, instead of searching for the smallest in the original list, we simply begin with the first element in the unsorted list, and do the work of sorting when we insert into the new-sorted list. When we insert the sorted list, we maintain sorted order.IndexUnsortedLocation in insertSorted19,3,7,2,1019 - - - - -29,3,7,2,1013,9 - - -39,3,7,2,1023,7,9 - -49,3,7,2,1012,3,7,9 -59,3,7,2,1052,3,7,9,10Bubble SortThe bubble sort only uses 1 array. It works by comparing 2 elements at a time. If the 2 elements are incorrect order, it swaps them. This continues until the largest element is "bubbled" to the end and this whole process is repeated until the entire list is sorted.IndexSwap?List1no swapE M N A P Z O B D C2no swapE M N A P Z O B D C3swapE M A N P Z O B D C4no swapE M A N P Z O B D C5no swapE M A N P Z O B D C6swapE M A N P O Z B D C7swapE M A N P O B Z D C8swapE M A N P O B D Z C9swapE M A N P O B D C DDisplaying a loopFor i 1..30 listPut list(i)End forAssignment Statement vs Conditions• To assign a value to a variable, we use assignment statements Ex. var age: intage := 16After variables have been assigned values, we may want to compare those values using a comparison statement also called a conditionA condition/comparison will be true or false BOOLEAN= equalnot= not equal< less than= greater then or equal toMike is way gayer then Anders x10Complex Comparisons• we can connect comparison statement with the words and, orEx. var age: int := 16 Var myage : int :=15Put age >=16 and myage = 15 ~TRUE Put age >=16 and age = 17 ~FALSE Put age >=16 or age = 17 ~TRUEStrina ComparisonsString can also be compared in TuringTuring does this by translating the strings into numbers by using ASCII codeIf StatementsIf statements are used when making a decision in a computer programThey use comparisons/conditions and evaluate those comparisons/conditions to one of two possible values: TRUE or FALSEAn if statement follows the balls structure below:If condition then(in this space code is written which will run only if condition = true) elsif condition2 then(in this space code is written that will run only if conditon2 = false) else(in this space code is written that will run...

Other Essays On Turing Exam Notes

Comparative Essay. "Heart Of Darkness" By Joseph Conrad And William Golding's "Lord Of The Flies"

2729 words - 11 pages It can be said that a certain degree of darkness lies within every person, but this darkness will not surface unless given the correct environment. The darkness, however, can emerge and ultimately destroy the person if not checked by reason. If one's inner darkness does surface, the victim then is given the opportunity to reach a point in personal growth, and to gain a sense of self-knowledge from it. That is, when one's darkness appears, one

This Is An Essay On The Woman In The Odyssey And Their Influences On His Travels

993 words - 4 pages The Odyssey is an epic about a Greek warrior in the Trojan War whose wanderings around his known world and his perilous encounters are the basis of the story. Odysseus' absence from his home is prolonged by the influences of the women whom he encounters.In this epic, several female characters had a profound effect on the plot. They wielded their influence through typically feminine skills and attributes: seduction, supernatural powers

Title:Aggressive and Passive. Compare characters in the Handmaid's Tail between Hamlet. Offred is aggressive while Ophelia is passive

537 words - 3 pages Aggressive and PassiveAggressive and Passive are two inverse attitudes to things, events or life. They cause different results. Offred and Ophelia are two women who have contrary destinies because of their different attitudes.Offred is a powerless woman in "the Handmaid's Tale". She's a handmaid of a commander in Gilead. She has no freedom. She belongs to him as a property. Her only duty is to have sex with the commander and give birth to a baby

Black Boy vs Grapes of Wrath

444 words - 2 pages Even though the books of Black Boy and Grapes of Wrath gave a vivid picture of the past American life to the readers regarding the socio-economic bigotry. Both books are similar in focusing the social and economic discrimination in the family setting. On Grapes of Wrath the California prejudice against the immigrants. Prejudice was a strong word, which leaves a bitter taste in the mouth. It is the prejudice against the migrant workers by the

Leprosy ; includes what bacteria it is caused by, the orgin of the disease, how many people are affected by it in the united states and in alaska during 1999 and 2000, and more. 3 pages long

524 words - 3 pages Leprosy is very dangerous for your personal health. It can make you skin fall off. Leprosy slowly eats away at you body. It is deadly to all genders, all ages, all sizes and all races.Another name for leprosy is Hansen's Disease. Leprosy is caused by the organism mycobacterium leprae. The pathogen that carries it is bacteria. Throughout the years people have suspected that inhaling and touching the bacteria could spread leprosy.Symptoms of

Reality Vs. Appearance - Hamlet

978 words - 4 pages In the play "Hamlet," Shakespeare's characters are confronted with the timeless question: How can one determine what is actually true from what only seems to be true? Throughout the play, the theme of appearance versus reality is constant. This theme is played out from the beginning, with Claudius' attempt to conceal his secret intentions; Gertrude and Ophelia masking their own truths, and finally Hamlet, who assumes the role of a madman in order

My favorite place

320 words - 2 pages Among the places where I have traveled, I especially like Fort Lauderdale very much. It fills me with beautiful memories. It reminds me of the days when I lived in Vietnam where I was born, especially the coconut trees, the hot and humid weather are like Vietnam. Fort Lauderdale has almost all the tropical fruits like jack fruit, durian, and longan. All these fruits are not grown in California.I usually come to Fort Lauderdale for a vacation. I

Mockery And Superiority In Canzone: Supported By Areopagitica Examines John Milton's Use Of Mockery And Superiority In The Poem Canzone; Supported By Areopagitica

1210 words - 5 pages PAGE PAGE 4 Zimmer Rachel ZimmerProf. GraffMilton: ENGL 420June 10, 2002Mockery and Superiority in Canzone:Supported by AreopagiticaMockery, as well as a sense of pride and/or superiority comes out in many of Milton's works and he exemplifies this by writing in ways that seems to humble himself, charm the subject of the poem, and yet scoff at him/her at the same time as well as prove his high intellect. Milton's often-circular logic exemplifies

Trichotillomania-Physcology 101 paper. Paper on an OCD diagnosis. This paper was written as term paper

562 words - 3 pages TrichotillomaniaTrichotillomania is a term coined by a French dermatologist in 1889 to describe the compulsive or irresistible urge that he saw in patients to pluck their hair out. The word trichotillomania is a Greek work meaning hair to pull, pluck, mania, frenzy, and madness. This is somewhat misleading as trichotillomania is referred to in psychiatry as an impulse disorder not a "madness" at all.Impulse control disorders are characterized by

Romeo And Juliet's Love Is Not Real Love, But Only An Idea Of The Real Aspect Of True Love

1161 words - 5 pages Romeo and Juliet is an awesome play written by William Shakespeare in the 15th century. This play is based upon two lovers, Romeo and Juliet, who in just a short period of three days meet, marry, make love, and die. Romeo is a Montague and Juliet is a Capulet. These two families have gone by many generations with hate towards one-another. Neither family can forgive and forget whatever argument had been started many decades ago. Although the two

Jean Rhys Novel

289 words - 2 pages In Jean Rhys's compelling novel about racial tension amidst confusion and anxiety, the author addresses this subtext in such a way as to portray Antoinette as a product of an intolerant society. While more of an underlying theme, the character's racial inner struggles in Wide Sargasso Sea represent a significance to the story's overall flavor and intensity, being that Antoinette is torn the entire time between calling herself black or white. Who

Similar Papers

Character In "The Yellow Wallpaper" By Charlotte Perkins Gilman

1587 words - 7 pages The short story 'The Yellow Wall-Paper' written by Charlotte Perkins Gilman is a cry for freedom. This story is about a woman who fights for her right to express what she feels, and fights for her right to do what she wants to do. The narrator in this short story is a woman whose husband loves her very much, but oppresses her to the point where she cannot take it anymore. This story revolves around the main character, her oppressed life, and her

Edgar Allen Poe's View Of Death In "The Fall Of The House Of Usher"

1836 words - 8 pages Edgar Allen Poe's Symbolism of Death in 'The Fall of the House of Usher'Death is defined as, 'The termination or extinction of something' (American Heritage Dictionary). Edgar Allen Poe uses this description in 'The Fall of the House of Usher' in different ways. Poe's intention when writing 'The Fall of the House of Usher' was not to present a moral, lesson, or truth to the reader; he was simply trying to bring forth a sense of terror to the

"Slaughterhouse Five" By Vonnegut Essay

2264 words - 10 pages When one begins to analyze a military novel it is important to first look at the historical context in which the book was written. On the nights of February 13-14 in 1944 the city of Dresden, Germany was subjected to one of the worst air attacks in the history of man. By the end of the bombing 135,000 to 250,000 people had been killed by the combined forces of the United States and the United Kingdom. Dresden was different then Berlin or many of

Psychoanalysis And Freud

2420 words - 10 pages Psychoanalysis is a system of psychology originated by the Viennese physician Sigmund FREUD in the 1890's and then further developed by himself, his students, and other followers. It consists of three kinds of related activities: (1) a method for research into the human mind, especially inner experiences such as thoughts, feelings, emotions, fantasies, and dreams; (2) a systematic accumulation of a body of knowledge about the mind; and (3) a