📄 pasq1005.html
字号:
<HTML>
<HEAD><LINK href="../style.css" rel="stylesheet" type="text/css">
<TITLE>Pascal Lesson 1 : Quiz 6</TITLE></HEAD>
<BODY background="../tile01.jpg">
<P><CENTER><H1>Quiz for Chapter 6</H1></CENTER>
<p>Let's quiz ! If you haven't read the <a href="pasl1005.html">
lesson</a>, you had better do it now before starting.</p>
<h3>Time : 60 minutes</h3>
<p><b>1-8 scores 5, 9 scores 10, 10 scores 50</b></p>
<p><ol>
<li>Explain the syntax of procedures and functions.</li>
<li>Explain the differences between them.</li>
<li>Explain the differences between pass by value and pass by reference. Give an example.</li>
<li>Can procedures nest each other ? Explain and give example !</li>
<li>Explain the differences between global variable and local variable.</li>
<li>Explain the rule of calling procedures / functions.</li>
<li>Explain how recursive calls and forward calls works.</li>
<li>Tell me the differences between recursive calls and forward calls.</li>
<li>Make a recursive algorithm of fibonacci series !</li>
<li> Make a guessing number game using functions and procedures.
You hold a random number between 1 to 100, and user have to guess. If
the guess is smaller than it suppose to be, you should say 'lower'. If
the guess is higher, say 'higher'. If it is the same, then user wins.
User has 8 chances to guess. If chances are used up, game over. Score
is number of chances left times 10. If user wins, get another number
and go on. Don't forget to restore the chances back to 8. If game over,
ask him/her to play again.
Here are some hint :<pre>
function compare(number, guess : byte):shortint;
function advice(comparison : shortint):string;
function asknumber: byte;
function yesno : boolean;
function score(guessleft : byte):longint;
procedure writeat(x,y : byte; sentence:string);
procedure setupscreen;
</pre></ol>
<p>That's it ! Good luck !</p><hr>
<P><H3>Where to go ?</H3>
<A HREF="pasl1005.html">Back to chapter 6</A><BR>
<A HREF="pasl1006.html">Advance to chapter 7</A>, about arrays<BR>
<A HREF="pasles01.html">To lesson 1 contents</A><BR>
<A HREF="../news.html">My main tutorial homepage</A><BR>
<A HREF="../mylink.html">My programming links</A><BR>
<A HREF="../faq.html">Contact me here</A>
<hr><P class="cpy">By : Roby Joehanes, © 1996, 2000</P>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -