StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...

Logo Programming Language - Essay Example

Cite this document
Summary
Question 1) Report (include examples) on your explorations and the applications of recursion in Topic 4. Detail the components of recursive procedures and explain in detail how the solution to Exercise 4.8 draws the square spiral.
Answer) The Logo programming language is a functional programming language…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER96.7% of users find it useful
Logo Programming Language
Read Text Preview

Extract of sample "Logo Programming Language"

Download file to see previous pages

Recursion is an alternative to REPEAT command. In general, Recursion is delineating as the process under which a function is defined in such a way that the function being defined is applied within its own definition. The term can be explained by taking a very simple example. Suppose, when the surfaces of two mirrors are placed parallel with each other the nested images that occur are a form of recursion. The great advantage of recursion is that an infinite set of possible sentences, designs or other data can be defined, parsed or produced by a finite computer program.

Logo allows the recursion where a procedure calls itself. The secret of recursive programming is the same as a secret of problem solving in general that is to reduce a big problem to a smaller problem. Now to make the above program more general and flexible, we can use recursive pattern in the following way. In the above example, we use the variable word instead of word "hello" and a general relationship is defined that will transform hello into hell. That relationship is established using the keyword butlast.

The above procedure becomes more meaningful using the stop rule. To implement stop rule user must answer, "What's the smallest case we want the program to handle" The answer is that for a single-letter word the downup should just print the word once. In other words, for a single-letter word, downup should carry out its first instruction and then stop. So the stop rule goes after that first instruction, and it stops if the input has only one letter: to downup :wordprint :wordif equalp count :word 1 [stop]downup butlast :wordprint :wordendAnother application of recursion is to draw square spiral.

The following is the code to draw square spiral.TO SQSPI :L IF :L > 150 [STOP] FD :L RT 90 SQSPI :L + 5 END Suppose we give a command SQSPL 100That means he should write 100 on a piece of paper and put it in his :L pocket. IF (:L > 150) [STOP]This is "the stop condition". The turtle looks in the front of his :L pocket and sees 150. He asks himself if 100 >150. If it is, then he will STOP. It is not, so he carries on. Now "the action" is performed. First FD :L, so the turtle walks FD 100. Then RT 90.

Now he has drawn this: And then "the call": SQSPI :L + 5 How can we tell the turtle to do SPIRAL again before he has finished with the first The turtle does not care. He just says I will finish the first SPIRAL later. He knows that the latest paper he put in his :L pocket is the only thing he needs to keep track of now. He saves the rest for later. : L + 5 is 100+5. That is 105. Therefore, the turtle now puts a paper with 105 in front of the other paper in his pocket. The next thing he sees is this: IF (:L >150) [STOP]This is "the stop condition" again.

He looks at the paper he just put in his :L pocket. Its 105, so it is smaller than 150. Therefore he does not stop. Then there's "the action". He sees FD :L. So he walks FD 105. Then RT 90. Now he has drawn this: Then there's "the call" again: SQSPI :L + 5 He says: I will finish this later. Now I must draw SPIRAL 110. He writes 110 on a paper and puts it in front of the o

...Download file to see next pages Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Logo Programming Language Essay Example | Topics and Well Written Essays - 3000 words”, n.d.)
Retrieved from https://studentshare.org/miscellaneous/1532153-logo-programming-language
(Logo Programming Language Essay Example | Topics and Well Written Essays - 3000 Words)
https://studentshare.org/miscellaneous/1532153-logo-programming-language.
“Logo Programming Language Essay Example | Topics and Well Written Essays - 3000 Words”, n.d. https://studentshare.org/miscellaneous/1532153-logo-programming-language.
  • Cited: 0 times

CHECK THESE SAMPLES OF Logo Programming Language

Interactive Educational Tools Design for Children

hellip; From the age-old abacus to the latest interactive multimedia tools as well as simulation models, we are in the process of redefining, refining and optimizing our teaching methodology. The development of programming language such as LOGO (Papert 1977) and SMALLTALK (Goldberg 1984) brought children into the design and development process....
4 Pages (1000 words) Essay

A Public Kiosk In Connection With The 2012 Olympics (Report)

The kiosk I wish to provide for the 2012 Olympics in London is one that will help Visitors maneuver more efficiently through the grounds and arrive at their events on time.... hellip; The specific purpose of the kiosk will be to help visitors find the events the wish to see.... It also helps with the decision making process by displaying all events at each hours....
15 Pages (3750 words) Essay

Evolution of Web Security

The universal database programming language for most of this web databases is SQL-Structured Query Language.... Web security analysis by various stakeholders has established that the security threats typically result from mistakes in coding or programming the website, poor input and output sensitization website.... Using web application programming languages like ASP, JSP, PHP, CGI, etc....
12 Pages (3000 words) Essay

Programming a Lego Mindstorm Robot

To facilitate the programming of the kit, a programming language referred to as NXT has been developed by LEGO.... This programming language gives everyone the ability to possess full control of the Lego Mindstorm Kit (Valk).... The use of this programming language if efficient even for people who lack programming language skills.... This project is aimed at constructing a programming a robot that has the ability to pick balls from the ground, carry the ball for at least one meter following a black line drawn on the ground and place the ball in a container 0....
5 Pages (1250 words) Essay

Designing a Website

This captures the idea of the website to have a well-constructed language that is commonly used by many of the users.... An example of a common language in the USA English language that must be used in most of the design sections of the website.... A choice of using more than one language should also be included in order to cater to other users who are only familiar with their native local language....
8 Pages (2000 words) Essay

The Advantages of Using Java in Creation Application

The paper "The Advantages of Using Java in Creation Application" presents java language.... nbsp;Java language has an extensive library of routines for easily coping with TCP/IP protocols like Http and FTP.... ava language has an extensive library of routines for easily coping with TCP/IP protocols like HTTP and FTP.... ava is a very environmentally flexible language since it can be easily run in multiple operating systems....
6 Pages (1500 words) Assignment

Technology Integration and Constructivism Theory

A key example in that regard is the use of Logo Programming Language, which Duffy and Jonassen (2013) essentially associate with constructivism.... For example, programming languages are always changing.... programming is notably an experience and the expression of an idea.... On the same note, programming gives rise to new experiences and ideas that people choose to assimilate and/or accommodate....
2 Pages (500 words) Essay

Software Engineering - System Modelling Tools and Techniques

… The paper “Software Engineering - System Modelling Tools and Techniques” is an excellent variant of thesis proposal on engineering.... This chapter introduces our graduate project.... This chapter will concentrate on the idea, aims, and objectives.... The chapter will also expound on the purpose and expected advantages of this project....
18 Pages (4500 words) Thesis Proposal
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us