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

📄 pasq1006.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 7</TITLE></HEAD>
<BODY background="../tile01.jpg">
<P><CENTER><H1>Quiz for Chapter 7</H1></CENTER>
<p>Let's quiz ! If you haven't read the <a href="pasl1006.html">
lesson</a>, you had better do it now before starting.</p>
<h3>Theory (15 minutes. Each scores 5)</h3>
<p><ol>
<li>What is an array ?</li>
<li>What is it for ?</li>
<li>How is the declaration ?</li>
<li>Explain how to use it !</li>
<li>How can we declare two or more dimension in array and explain the usage.</li>
<li>Suppose we have n : array[char] of byte; Is it valid ? Explain.</li>
</ol>
<h3>Practices</h3>
<h4>A. Easy (10 min)</h4><p><ol>
<li>Make a Pascal triangle, example :<pre>
   Input  : 7
   Output :        1
                  1 1
                 1 2 1
                1 3 3 1
               1 4 6 4 1
             1 5 10 10 5 1
            1 6 15 20 15 6 1
</pre></li>
<li>Suppose you have an array 100 elements of random numbers. Find its maximum
   and minimum value of the elements.</li>
</ol>
<h4>B. Intermediate (20 min)</h4><p><ol start=3>
<li>Make matrix operations : addition, subtraction, multiplication and division.
You may limit the maximum dimension of the matrix.</li>
<li>Make  a menu that highlights the selection. User can press up  and  down
arrow and press enter to make a choice.</li>
</ol>
<h4>C. Challenge (45 min. Choose one of these)</h4><p><ol start=5>
<li>Make a jackpot game. It has 4 digits. Each digits is represented by numbers.
Jackpot can have 4 players to play. Each players has $500 at start and must place
their bet of $20 every game. Winning points :
<center><table border=2>
<tr><th>If</th><th>Bet returned plus bonus</th></tr>
<tr><td>Any two numbers are the same</td><td>10%</td></tr>
<tr><td>Any three are the same</td><td>25%</td></tr>
<tr><td>All four numbers are the same</td><td>100% (bet doubled)</td></tr>
<tr><td>All four are in sequence e.g. 1 2 3 4 or 5 4 3 2</td><td>50%</td></tr>
<tr><td>All four are even or all odd e.g. 1 7 5 3 or 2 6 4 8</td><td>5%</td></tr>
<tr><td>All four are prime numbers</td><td>10%</td></tr>
<tr><td>Two numbers are the same and the other two are the same too</td><td>75%</td></tr>
<tr><td>None of above</td><td>bet lost</td></tr>
</table></center>
Remember, in one digit, possible primes are : 2, 3, 5, and 7 only. Example :
<center><table border=2>
<tr><th>Sequence</th><th>Bonus</th></tr>
<tr><td>1 1 2 2</td><td>75%</td></tr>
<tr><td>2 1 2 1</td><td>75%</td></tr>
<tr><td>2 1 2 2</td><td>25%</td></tr>
<tr><td>9 5 3 7</td><td>5%</td></tr>
<tr><td>7 2 3 5</td><td>10%</td></tr>
<tr><td>4 3 2 1</td><td>50%</td></tr>
<tr><td>1 8 3 2</td><td>lost</td></tr>
</table></center>
Players  lose if he/she has less than $20 and cannot continue the game.
The winner is who can stay after all players are gone.</li>
<li>Make  a blackjack game for 4 players. Players put their bet in the  pot.
   The  winner get the pot. Initially, players has $500. Each  bet  minimal
   $5.  Players  lose if he/she has less than $5 and can not  continue  the
   game.  The  winner is who can stay after all players are  gone.  Winning
   rank :<ol>
   <li>Instant blackjack (Ace of spade and Jack of spade)</li>
   <li>Blackjack (any Ace and jack of the same pattern)</li>
   <li>Blackjack (any mixed ace and jack)</li>
   <li>Indirect blackjack (all summed up of 21)</li>
   <li>Bingo (5 cards already but is 21 or less/not burnt out)</li>
   <li>Any number (the bigger the score, is the winner)</li></ol>
   If you have two or more players won with the same rank, you should divide
   the pot equally. If all is burnt (all cards are 22 or up), then there
   are  no winner, and the pot stays, but players should place another  bet
   in the pot for the next game. Hint : Heart ASCII code is 3, Diamond is 4,
   Club is 5, and 6 for Spades.</li>
<li>Make a poker game. The rule is the same as blackjack, but you may raise,
   drop, or follow. (Just like normal poker game)</li>
<li>Space invader revisited.<br>
   Last  time you made space invader. Now you make a full version of  Space
   Invader with matrices of enemies. You may extend it with bonus stages or
   UFO. All rules remain the same.</li>
</ol><p>Good luck !</p><hr>
<P><H3>Where to go ?</H3>
<A HREF="pasl1006.html">Back to chapter 7</A><BR>
<A HREF="pasl1007.html">Advance to chapter 8</A>, about strings<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, &copy; 1996, 2000</P>
</body></html>

⌨️ 快捷键说明

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