⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pasq1004.html

📁 This is programing tutorial for people who wants to know programing in PASCAL.Pascal might be not th
💻 HTML
字号:
<HTML>
<HEAD><LINK href="../style.css" rel="stylesheet" type="text/css">
<TITLE>Pascal Lesson 1 : Quiz 5</TITLE></HEAD>
<BODY background="../tile01.jpg">
<P><CENTER><H1>Quiz for Chapter 5</H1></CENTER>
<p>Now, let's have a quiz ! If you haven't read the <a href="pasl1004.html">
lesson</a>, you had better do it now before starting.</p>
<h3>Part I : Theory (Solved in 30 minutes)</h3><ol>
<li>Explain the characteristics of all three loop syntaxes in Pascal !</li>
<li>Explain the differences between them !</li>
<li>Suppose the output is :<br><pre>
   1
   2
   3
   4
   5
   6
</pre>Write an excerpt using all three syntaxes !</li>
<li>Explain how to nest one syntax to another !</li></ol>
<h3>Part II : Practical</h3>
<p>In part II, I will give you the sample input and output. You must write  an
excerpt, using only ONE of the loop syntaxes provided by Pascal. The choice
is up to you. As long as they can be run correctly, you get the points.
Tip : Before entering this quiz, practise a lot !</p>
<h4>A. Easy (Solved in 25 minutes)</h4>
<pre>
1. Input  : 5                          2. Input  : 5
   Output : 1 2 3 4 5 4 3 2 1             Output : 1 2 3 4 5
   Input  : 1                                      1 2 3 4 5
   Output : 1                                      1 2 3 4 5
                                                   1 2 3 4 5
3. Input  : 5                                      1 2 3 4 5
   Output : 1 2 3 4 5                  4. Input  : 5
            2 3 4 5 1                     Output : 1
            3 4 5 1 2                              1 2
            4 5 1 2 3                              1 2 3
            5 1 2 3 4                              1 2 3 4
                                                   1 2 3 4 5

5. Input  : 5                          6. Input  : 5
   Output : 1                             Output : 1 1 1 1 1
            2 2                                    2 2 2 2 2
            3 3 3                                  3 3 3 3 3
            4 4 4 4                                4 4 4 4 4
            5 5 5 5 5                              5 5 5 5 5
</pre><p>Here is the criteria -- If you solve it correctly in :<p>
<center><table border=2><tr><th>Time in minutes</th><th>Category</th></tr>
<tr><td>&lt;= 3</td><td>Amazing !</td></tr>
<tr><td>3 &lt; time &lt;= 6</td><td>Great !</td></tr>
<tr><td>6 &lt; time &lt;= 10</td><td>Very good !</td></tr>
<tr><td>10 &lt; time &lt;= 15</td><td>Good !</td></tr>
<tr><td>15 &lt; time &lt;= 20</td><td>Average</td></tr>
<tr><td>20 &lt; time &lt;= 25</td><td>Below average</td></tr>
<tr><td>&gt; 25</td><td>Poor</td></tr></table></center>
<h4>B. Intermediate (Solved in 30 minutes)</h4>
<p><pre>
7. Input  : 5                          8. Input  : 5
   Output :        1                      Output : 1 1 1 1 1
                 1 2 1                             1 2 2 2 1
               1 2 3 2 1                           1 2 3 2 1
             1 2 3 4 3 2 1                         1 2 2 2 1
           1 2 3 4 5 4 3 2 1                       1 1 1 1 1
         1 2 3 4 4 4 4 4 3 2 1
       1 2 3 3 3 3 3 3 3 3 3 2 1
     1 2 2 2 2 2 2 2 2 2 2 2 2 2 1
   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
</pre>
<ol start=9>
<li>Make fibonacci series. If input is n, write all the series up to n numbers :<br>
   Input  : 10<br>
   Output : 1 1 2 3 5 8 13 21 34 55<br>
   The first and the second numbers of fibonacci series are 1. The third is
   the sum of the first and the second. The fourth is the sum of the second
   and the third. The fifth is the sum of the third and the fourth, so on.</li>
<li>Make a factor tree.<pre>
    Input  : 100                    Input  : 1001
    Output :           100          Output :       1001
                      /   \                         /\
                     2     50                      7  143
                           /\                          /\
                          2  25                      11  13
                             /\     Input  : 5
                            5  5    Output : 5 is a prime !
</pre></li>
<li>Text animation :<br>
    Input  : abcdefghijklmno<br>
    Output : The text will bounce around the screen until a key is pressed.<br>
    For better details, run <a href="11.ZIP">11.exe</a>. Note : Original filesize is 4075 bytes.
    Do not disassemble 11.exe ! It is considered as cheating !!</li></ol>
<p>Here is the criteria -- If you solve it correctly in :<p>
<center><table border=2><tr><th>Time in minutes</th><th>Category</th></tr>
<tr><td>&lt;= 5</td><td>Amazing !</td></tr>
<tr><td>5 &lt; time &lt;= 10</td><td>Great !</td></tr>
<tr><td>10 &lt; time &lt;= 15</td><td>Very good !</td></tr>
<tr><td>15 &lt; time &lt;= 20</td><td>Good !</td></tr>
<tr><td>20 &lt; time &lt;= 25</td><td>Average</td></tr>
<tr><td>25 &lt; time &lt;= 30</td><td>Below average</td></tr>
<tr><td>&gt; 30</td><td>Poor</td></tr></table></center>
<h4>C. (not so) Hard (Solved in 45 minutes)</h4>
<p>Create a game just like a space invader (you've got to know that), but
   in normal text mode (80x25). Use colors as pretty as possible. Normally
   space  invader have a matrix of enemies, but I make allowances to you.
   You just make only one enemy. If the enemy is destroyed, it just reappears
   at a different place and the player gains a point. Each players
   have 3 ships to play. If all ships are used up (shot down) you show
   Game Over message and ask if the player want to play again. Each
   enemy ship scores 10. Player got an extra ship when reaches 500 and its
   multipliers  (1000,  1500, 2000,...). Players can only have  one  shot.
   Before the fire is out, players can not trigger another shot. The  same
   rule applies for the enemy. Player could only move his/her ship horizon
   tally (left or right), not vertically or diagonally. The enemy may come
   closer to the ship after it reaches the edge (of left or right). I mean
   that the enemy ship go left or right, after it touches the edge, it
   advances a bit -- just like a normal space invader game. Make it as fancy
   as possible.</p>
<p>If you made it correctly in :<p>
<center><table border=2><tr><th>Time in minutes</th><th>Category</th></tr>
<tr><td>&lt;= 15</td><td>Amazing !</td></tr>
<tr><td>15 &lt; time &lt;= 25</td><td>Great !</td></tr>
<tr><td>25 &lt; time &lt;= 30</td><td>Very good !</td></tr>
<tr><td>30 &lt; time &lt;= 35</td><td>Good !</td></tr>
<tr><td>35 &lt; time &lt;= 40</td><td>Average</td></tr>
<tr><td>40 &lt; time &lt;= 45</td><td>Below average</td></tr>
<tr><td>&gt; 45</td><td>Poor</td></tr></table></center>
<p>That's it !</p><hr>
<P><H3>Where to go ?</H3>
<A HREF="pasl1004.html">Back to chapter 5</A><BR>
<A HREF="pasl1005.html">Advance to chapter 6</A>, about procedures and functions<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>By : Roby Joehanes, &copy; 1996, 2000</P>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -