Computer Science Canada help on my summative |
Author: | recyclebin123 [ Sun May 29, 2005 2:53 pm ] |
Post subject: | help on my summative |
Here is my summative thing which i dun really know how to put it together. My problems are that i dun no how to make the titlescreeen go off after the user presses any button. Also in the menu i dun no how to go back after choosing any one of the options. And also i dun no how to display the test results. PLZ help me on this one...lol worth 30% of my mark. (I know my coding is a bit messy but i got no time to fix it properly) setscreen ("graphics:800;800,nobuttonbar") var font1, font2 : int font1 := Font.New ("comic ms:14:bold") font2 := Font.New ("times new roman:14:bold") var menuchoice : string var key : string (1) process titlescreen colorback (255) cls drawmapleleaf(639,0,539,100,red) drawfillmapleleaf(639,0,539,100,red) drawmapleleaf(100,10,0,100,red) drawfillmapleleaf(100,10,0,100,red) drawmapleleaf(550,300,639,390,red) drawfillmapleleaf(550,300,639,390,red) drawmapleleaf (100, 280, 0, 390, red) drawfillmapleleaf(100,280,0,390,red) for a : 16 .. 31 color (a) locate (12, 25) put "Welcome" delay (100) end for for b : 16 .. 31 color (b) locate (12, 33) put "To" delay (100) end for for c : 16 .. 31 color (c) locate (12, 36) put "My" delay (100) end for for d : 16 .. 31 color (d) locate (12, 39) put "Summative" delay (100) end for for e : 16 .. 31 color (e) locate (12, 49) put "Project" delay (100) end for delay (2000) for f : 16 .. 31 color (f) locate (13, 30) put "By: Raymond Tang" delay (100) end for for g : 16 .. 31 color (g) locate (14, 30) put "Course Code: TIK02-04" delay (100) end for for h : 16 .. 31 color (h) locate (15, 30) put "Date: May 30, 2005" delay (100) end for for i : 16 .. 31 color (i) locate (16, 29) put " Teacher: Mr Rao!" delay (100) end for delay (2000) getch (key) cls end titlescreen %second menu thing process mainmenu colorback (black) cls drawmapleleaf(639,0,539,100,red) drawfillmapleleaf(639,0,539,100,red) drawmapleleaf(100,10,0,100,red) drawfillmapleleaf(100,10,0,100,red) drawmapleleaf(550,300,639,390,red) drawfillmapleleaf(550,300,639,390,red) drawmapleleaf (100, 280, 0, 390, red) drawfillmapleleaf(100,280,0,390,red) Font.Draw ("Please Choose One of the Following By Pressing The Number Then ENTER", 10, 300, font1, white) Font.Draw ("1 : Animation",10,270,font2,white) Font.Draw ("2 : Lesson",10,240,font2,white) Font.Draw ("3 : Test",10,210,font2,white) Font.Draw ("4 : Results",10,180,font2,white) Font.Draw ("5 : Exit",10,150,font2,white) get menuchoice if menuchoice="1" then colourback(white) cls loop for i : 1 .. 1000 cls drawfillbox (0, 0, i * 2, i * 4, 4) drawfillmapleleaf (i * 3, 0, i * 7, i * 4, 4) drawfillbox (i * 8, 0, i * 10, i * 4, 4) exit when (i) * 8 > maxx delay (20) View.Update end for end loop getch (key) cls elsif menuchoice="2" then colourback(white) cls put "Canada! one of the peaceful places to live in the world. As you already know, Canada is located in the continent of North America and is directly above the United States.".. put "As you should already know, Canada has ten provinces and 3 territories. They include the following: British Columbia, Alberta, Saskatchewan, Manitoba, Ontario, Quebec".. put "NewFoundLand and Labrador, Prince Edward Island, Nova Scotia, New Brunswick, Yukon, North-West Territories and Nunavut." put "Canada has an very intresting history. Canada was first born in 1867 and during every year on July 1st, it is known as Canada Day which is sort of a birthday for Canada".. put "During the early 1900s, Canada had many great years of properity where many new inventions were created such as the radio and the bicycle. Then in the 1920 and 30s ".. put "Canada entered World War 1 which Canada, France and Britain went to war with Germany,Italy and Russia. During these times Canada had suffered many loses that affected".. put "all of Canada. When the war was finally over, Canada experienced great joy for the war was finally over but soon after the end of WW1, Canada woud be plunged into".. put "the great depression. During this times of grieve, many people lost their jobs. Wages were extremely low and the stock market had just crashed. No one in Canada".. put "had a good way to solve the great depression. Finally the great depression ended when Canada entered WW2 which is bad but good at the same time because the war".. put "had provided people with jobs. In this war Canada also lost a great number of people but luckily the war ended soon after the US dropped a nucleur bomb on Japan.".. put"Some People might think of that as a bad thing because of the number people it killed but if they haven't done that then more people would have died. Later on when".. put "WW2 ended the world entered the cold war. People feared nucleur weapons after seeing what they could do and the US had them. This all changed when the Soviet Union".. put "got hold of the plans and made their own nucleur weapon. During this time the US and the Soviet both threatened each other with nucleur weapons. Everyone was afraid".. put "of what damage it could do if a bomb was exploded No one wanted a nucleur war but once it did come close to it during the cuban missile crisis. Other than the threat".. put "of nucleur weapons there was also fear that Quebec would leave Canada. The Canadian government would not allow this but many Quebec separists continue their struggle".. put "for freedom. Quebecers felt that they were losing their language and heritage. There was one terrorist group called the FLQ where they used violence as a mean of".. put "getting their way. They set bombs in mail boxes and also kidnapped two politicians and killed one of them. This lead to the activation of the War Measures Act where".. put" it would give the police the ability to arrest people without telling them the reason for arrest. Many people were arrested by this but at the end of this crisis".. put "none of them were actually put into jail. As the years went by Canada and the world felt less threatened by nucleur weapons which in a way ended the cold war.".. put "Following this was the time for properity. New inventions has once again been invented. Computers were one of them but the ones back then are no where near the".. put "the ones we have now. Although, because of them it opened up more job oppertunities for people in Canada. As the years went by Canada developed more connections".. put "and ties with the US for example they joined together in NATO and NORAD which both were an both an alliance between them to protect the two countries. USA then became".. put "Canada's biggest trade partner and thus developed strong ties with them. This concludes the lesson on Canada's history! Hope you learned something and to test your".. put "knowledge, go and try the test".. getch (key) cls elsif menuchoice="3" then colourback(white) cls var guess : string var count : int := 0 put "You get THREE trys for each question\n\n" put "When was Canada born?" for i : 0 .. 2 get guess : * if guess = "1867" then put "yup!" count += 3 - i exit end if put "\nnope, try again" end for put "\nHow many provinces does Canada have?" for i : 0 .. 2 get guess : * if guess = "10" then put "yup!" count += 3 - i exit end if put "\nnope, try again" end for put "\nHow many territories does Canada have?" for i : 0 .. 2 get guess : * if guess = "3" then put "yup" count += 3 - i exit end if put "\nnope, try again" end for put "\nWhat did the US drop on Japan to end WW2" for i : 0 .. 2 get guess : * if guess = "nucleur bomb" or guess="nucleurbomb" then put "yup" count += 3 - i exit end if put "\nnope, try again" end for put "\nWhich province wanted to seperate from Canada" for i : 0 .. 2 get guess : * if guess = "Quebec" or guess="quebec" then put "yup" count += 3 - i exit end if put "\nnope, try again" end for getch (key) cls elsif menuchoice="5" then quit elsif menuchoice="4" then %%how do i show results of test from here end if end mainmenu fork mainmenu |
Author: | atrain [ Sun May 29, 2005 3:20 pm ] |
Post subject: | |
draw the tittle screen, then put a loop at the end: loop exit when hasch end loop will loop intill it gets a button pressed |
Author: | recyclebin123 [ Sun May 29, 2005 3:47 pm ] |
Post subject: | |
thx for that but i still need alot more help on the rest of it ![]() |
Author: | Mr. T [ Sun May 29, 2005 4:02 pm ] |
Post subject: | |
1. use code tags 2. read up in the tutorial section for why processes are evil ![]() |
Author: | StarGateSG-1 [ Sun May 29, 2005 4:35 pm ] |
Post subject: | |
I think no more help should be given until you read alot of the tutorials and go into turing help, all of your problems will be answered. This is your summative and we are not going to give to you marks, you also need to read the sticky's at top of topic list, when you nhave done that and you have learned some more, then we will help you. This is not a free palce to get everything you don;t understand done. |