Yliopiston etusivulle In English
Helsingin yliopisto
clt230: Introduction to Programming - lukuvuosi 2009-2010


Yleisen kielitieteen laitos

PL 24 (Unioninkatu 40)

Puhelin +358 (09) 1911 (vaihde)
Faksi +358 (09) 191 28313

8. Recursion. Keyboard Input. Debugging.

  • Lecture notes
  • Further reading
  • Practical work
    • Write a program that prompts for keyboard input by asking some of the questions in 5.11. Keyboard Input and in the Bridge of Death scene, such as:
      What...is your name?
      What...is your favourite colour?
      What...is the airspeed velocity of an unladen swallow?
    • The program should check the answers to the questions and use conditionals to decide whether to ask the next question, whether the user can cross the Bridge of Death or whether the user will be cast into the Gorge of Eternal Peril.
    • Extend the program so that several knights can try in turn to answer the "questions three".
© 2001-2009 Graham Wilcock