Saturday, 31 December 2016
Tuesday, 27 December 2016
basic code for game
Module Module1
Dim age As Single
Dim Name As String
Dim Helth As Single
Dim THealth As Single
Dim RHealth As Single
Sub Main()
Dim NameLoop As Boolean
Dim NameCheck As String
THealth = 100
Helth = 100
RHealth = 100
NameLoop = True
While NameLoop = True
Console.WriteLine("please enter your name")
Name = Console.ReadLine()
Console.WriteLine("are you sure you want this name: Y/N")
NameCheck = Console.ReadLine()
If NameCheck = "Y" Or NameCheck = "y" Then
NameLoop = False
ElseIf NameCheck = "N" Or NameCheck = "n" Then
NameLoop = True
Else
Console.WriteLine("that is invalid")
NameLoop = True
End If
End While
protocal1()
Dim age As Single
Dim gender As String
Console.ReadLine()
End Sub
Sub protocal1()
Console.WriteLine("you are in a city, skyscrapers dominate the land and airships dominate the sky")
Console.WriteLine("there are flying adverts for everything from robot dogs to the most 'reaistic' apples in the world")
Dim move1 As Single
Dim move1loop As Boolean
Console.WriteLine("a droid flies over to you")
Console.WriteLine("- hello my name is barry welcome to Jorvic - the droid spoke in an unettelingly human voice")
Console.WriteLine("the droid flies away ")
Console.WriteLine(" ")
Console.WriteLine(" you have three options of where to go first ")
Console.WriteLine("1) the person closest to you")
Console.WriteLine("2) the officers club")
Console.WriteLine("3) ministry of location")
Console.WriteLine("you can either choose 1, 2 or 3")
Dim caseloop1 As Boolean
caseloop1 = True
While caseloop1 = True
move1loop = True
While move1loop = True
Try
move1 = Console.ReadLine()
move1loop = False
Catch ex As Exception
Console.WriteLine("that is invalid please try again")
move1loop = True
End Try
Select Case move1
Case "1"
Console.WriteLine("the person neerest to you is a man of aveage hight with a skull cap and goggles on")
Console.WriteLine("you ask him about what you are to do in this new place")
Console.WriteLine(" ")
Console.WriteLine("- well if you are a new arrival you should go to the ministry of location - he spoke in a quick and erratic mannor")
Console.WriteLine(" ")
Console.WriteLine("you ask him what that is")
Console.WriteLine(" ")
Console.WriteLine("- well as the name suggests they locate or re-locate people to where they are needed -")
Console.WriteLine("- I am sorry but I have to go, good luck at the ministry. -")
Console.WriteLine(" ")
Console.WriteLine("the man runs off and you wonder what to do next")
caseloop1 = True
Case "2"
Console.WriteLine("you walk into a club")
Console.WriteLine("the room was empty")
Console.WriteLine("the lights were off exept for over the bar")
Console.WriteLine("you walk over and call out for somebody")
Console.WriteLine("a few seconds later a tall thin man with long black hair on one side of his head and th other shaven comes out form a door behind the bar")
Console.WriteLine(" ")
Console.WriteLine("- sorry but we arn't open yet - he spokein a calm almost dead tone")
Console.WriteLine(" ")
Console.WriteLine("you tell him that you just want to know where to go and you tell him what has happened")
Console.WriteLine(" ")
Console.WriteLine("- my name is ben, I run this club with my sister bernedette, if you don't have a job and don't know what to do you should go to the ministry of location -")
Console.WriteLine("- but be warned you may not like where you are placed - ")
Console.WriteLine(" ")
Console.WriteLine("you go back to your origonal location")
caseloop1 = True
Case "3"
Console.WriteLine("you walk up to a large intimidating building with a large stone statue of Eudaemon outside")
Console.WriteLine("inside the building is covered in various types of marble")
Console.WriteLine("you see a woman sat behind a desk wearing smart clothes on a computer")
Console.WriteLine("you go up to the woman and ask what if this is the minastry of location")
Console.WriteLine(" ")
Console.WriteLine("- yes you are at the ministry of location - she spoke in a polite and formal manor")
Console.WriteLine("- before you can continue you have to fill out these questions")
Console.WriteLine("she hands you a questionair")
Console.WriteLine("you write your name at the top and continue to answer the questions")
Console.WriteLine(" ")
Dim ageloop As Boolean
ageloop = True
While ageloop = True
Console.WriteLine("what is your age")
Try
age = Console.ReadLine()
ageloop = False
Catch ex As Exception
Console.WriteLine("that is invalid try again")
ageloop = True
End Try
End While
Dim gender As Char
Dim genloop As Boolean
genloop = True
While genloop = True
Console.WriteLine("what is your gender M/F")
Dim genloop2 As Boolean
genloop2 = True
While genloop2 = True
Try
gender = Console.ReadLine()
genloop2 = False
Catch ex As Exception
Console.WriteLine("that is invalid, please try again")
genloop2 = True
End Try
End While
If gender = "M" Or gender = "m" Then
genloop = False
ElseIf gender = "F" Or gender = "f" Then
genloop = False
Else
Console.WriteLine("your answer must be F or M and nothing else, try again")
genloop = True
End If
End While
End Select
End While
Dim exit1 As Char
Dim exitloop As Boolean
Dim exitloop2 As Boolean
exitloop = True
While exitloop = True
exitloop2 = True
While exitloop2 = True
Console.WriteLine("are you sure about your choices Y/N")
Try
exit1 = Console.ReadLine()
exitloop2 = False
Catch ex As Exception
Console.WriteLine("that is invalid")
exitloop2 = True
End Try
End While
If exit1 = "Y" Or exit1 = "y" Then
exitloop = False
caseloop1 = False
ElseIf exit1 = "N" Or exit1 = "n" Then
exitloop = False
caseloop1 = True
End If
End While
End While
End Sub
End Module
Dim age As Single
Dim Name As String
Dim Helth As Single
Dim THealth As Single
Dim RHealth As Single
Sub Main()
Dim NameLoop As Boolean
Dim NameCheck As String
THealth = 100
Helth = 100
RHealth = 100
NameLoop = True
While NameLoop = True
Console.WriteLine("please enter your name")
Name = Console.ReadLine()
Console.WriteLine("are you sure you want this name: Y/N")
NameCheck = Console.ReadLine()
If NameCheck = "Y" Or NameCheck = "y" Then
NameLoop = False
ElseIf NameCheck = "N" Or NameCheck = "n" Then
NameLoop = True
Else
Console.WriteLine("that is invalid")
NameLoop = True
End If
End While
protocal1()
Dim age As Single
Dim gender As String
Console.ReadLine()
End Sub
Sub protocal1()
Console.WriteLine("you are in a city, skyscrapers dominate the land and airships dominate the sky")
Console.WriteLine("there are flying adverts for everything from robot dogs to the most 'reaistic' apples in the world")
Dim move1 As Single
Dim move1loop As Boolean
Console.WriteLine("a droid flies over to you")
Console.WriteLine("- hello my name is barry welcome to Jorvic - the droid spoke in an unettelingly human voice")
Console.WriteLine("the droid flies away ")
Console.WriteLine(" ")
Console.WriteLine(" you have three options of where to go first ")
Console.WriteLine("1) the person closest to you")
Console.WriteLine("2) the officers club")
Console.WriteLine("3) ministry of location")
Console.WriteLine("you can either choose 1, 2 or 3")
Dim caseloop1 As Boolean
caseloop1 = True
While caseloop1 = True
move1loop = True
While move1loop = True
Try
move1 = Console.ReadLine()
move1loop = False
Catch ex As Exception
Console.WriteLine("that is invalid please try again")
move1loop = True
End Try
Select Case move1
Case "1"
Console.WriteLine("the person neerest to you is a man of aveage hight with a skull cap and goggles on")
Console.WriteLine("you ask him about what you are to do in this new place")
Console.WriteLine(" ")
Console.WriteLine("- well if you are a new arrival you should go to the ministry of location - he spoke in a quick and erratic mannor")
Console.WriteLine(" ")
Console.WriteLine("you ask him what that is")
Console.WriteLine(" ")
Console.WriteLine("- well as the name suggests they locate or re-locate people to where they are needed -")
Console.WriteLine("- I am sorry but I have to go, good luck at the ministry. -")
Console.WriteLine(" ")
Console.WriteLine("the man runs off and you wonder what to do next")
caseloop1 = True
Case "2"
Console.WriteLine("you walk into a club")
Console.WriteLine("the room was empty")
Console.WriteLine("the lights were off exept for over the bar")
Console.WriteLine("you walk over and call out for somebody")
Console.WriteLine("a few seconds later a tall thin man with long black hair on one side of his head and th other shaven comes out form a door behind the bar")
Console.WriteLine(" ")
Console.WriteLine("- sorry but we arn't open yet - he spokein a calm almost dead tone")
Console.WriteLine(" ")
Console.WriteLine("you tell him that you just want to know where to go and you tell him what has happened")
Console.WriteLine(" ")
Console.WriteLine("- my name is ben, I run this club with my sister bernedette, if you don't have a job and don't know what to do you should go to the ministry of location -")
Console.WriteLine("- but be warned you may not like where you are placed - ")
Console.WriteLine(" ")
Console.WriteLine("you go back to your origonal location")
caseloop1 = True
Case "3"
Console.WriteLine("you walk up to a large intimidating building with a large stone statue of Eudaemon outside")
Console.WriteLine("inside the building is covered in various types of marble")
Console.WriteLine("you see a woman sat behind a desk wearing smart clothes on a computer")
Console.WriteLine("you go up to the woman and ask what if this is the minastry of location")
Console.WriteLine(" ")
Console.WriteLine("- yes you are at the ministry of location - she spoke in a polite and formal manor")
Console.WriteLine("- before you can continue you have to fill out these questions")
Console.WriteLine("she hands you a questionair")
Console.WriteLine("you write your name at the top and continue to answer the questions")
Console.WriteLine(" ")
Dim ageloop As Boolean
ageloop = True
While ageloop = True
Console.WriteLine("what is your age")
Try
age = Console.ReadLine()
ageloop = False
Catch ex As Exception
Console.WriteLine("that is invalid try again")
ageloop = True
End Try
End While
Dim gender As Char
Dim genloop As Boolean
genloop = True
While genloop = True
Console.WriteLine("what is your gender M/F")
Dim genloop2 As Boolean
genloop2 = True
While genloop2 = True
Try
gender = Console.ReadLine()
genloop2 = False
Catch ex As Exception
Console.WriteLine("that is invalid, please try again")
genloop2 = True
End Try
End While
If gender = "M" Or gender = "m" Then
genloop = False
ElseIf gender = "F" Or gender = "f" Then
genloop = False
Else
Console.WriteLine("your answer must be F or M and nothing else, try again")
genloop = True
End If
End While
End Select
End While
Dim exit1 As Char
Dim exitloop As Boolean
Dim exitloop2 As Boolean
exitloop = True
While exitloop = True
exitloop2 = True
While exitloop2 = True
Console.WriteLine("are you sure about your choices Y/N")
Try
exit1 = Console.ReadLine()
exitloop2 = False
Catch ex As Exception
Console.WriteLine("that is invalid")
exitloop2 = True
End Try
End While
If exit1 = "Y" Or exit1 = "y" Then
exitloop = False
caseloop1 = False
ElseIf exit1 = "N" Or exit1 = "n" Then
exitloop = False
caseloop1 = True
End If
End While
End While
End Sub
End Module
Sunday, 13 November 2016
Q1 (b) (ii)
in a 265colour image, each byte can represent 256 different colour codes
2 squared = 256 and there are 8 bits in a byte
2 squared = 256 and there are 8 bits in a byte
Q1 (a) (iii)
in this question I forgot to mention the staircase/ pixilation effect after a bitmap image is enlarged
revised answers from test
processes require when used in a drawing are line thickness, colour, the label, name etc.
Tuesday, 1 November 2016
Sunday, 30 October 2016
rock paper scissors pseudo code
begin
ComputerMoves = randint in range 1-3
PlayerMoves " please enter rock paper or scissors"
case select PlayerMoves
case rock
Move = 1
case paper
Move = 2
case = scissors
Move = 3
winner = ""
Case select = winner
case ComputerMoves = Move
Output "Draw"
case ComputerMoves = 1 AND Move = 2
Output "Player wins"
case Computer Moves = 2 AND Move = 3
Oputput "Player wins"
case ComputerMoves = 3 AND Move = 1
Output "Computer wins"
case ComputerMoves = 2 AND Move = 1
Output "Computer wins"
case Computer Moves = 3 AND Move = 2
Oputput "Computer wins"
case ComputerMoves = 1 AND Move = 3
Output "Player wins"
ComputerMoves = randint in range 1-3
PlayerMoves " please enter rock paper or scissors"
case select PlayerMoves
case rock
Move = 1
case paper
Move = 2
case = scissors
Move = 3
winner = ""
Case select = winner
case ComputerMoves = Move
Output "Draw"
case ComputerMoves = 1 AND Move = 2
Output "Player wins"
case Computer Moves = 2 AND Move = 3
Oputput "Player wins"
case ComputerMoves = 3 AND Move = 1
Output "Computer wins"
case ComputerMoves = 2 AND Move = 1
Output "Computer wins"
case Computer Moves = 3 AND Move = 2
Oputput "Computer wins"
case ComputerMoves = 1 AND Move = 3
Output "Player wins"
practice pseudocode for text based game 3
continued
Option3 = false
while Option3 = false
Move 3 = "what do you do"
If Move3 = forward then
Output "there is a speaker in the far right corner of the room that crackles to life"
Option3 = true
else then
Output "that isn't an option"
Option3 = false
Option4 = false
while option4 = false
Question2 "Johnny's mum has 3 children the first is called may, the second is called June. what is the name of the third?"
case select Question2
case = Johnny or john
Output " that is correct"
Option4 = true
case = July
Output"that is the obvious answer re read the question"
Option4 = false
else
Output" that is incorrect try again"
Option4 = false
Option3 = false
while Option3 = false
Move 3 = "what do you do"
If Move3 = forward then
Output "there is a speaker in the far right corner of the room that crackles to life"
Option3 = true
else then
Output "that isn't an option"
Option3 = false
Option4 = false
while option4 = false
Question2 "Johnny's mum has 3 children the first is called may, the second is called June. what is the name of the third?"
case select Question2
case = Johnny or john
Output " that is correct"
Option4 = true
case = July
Output"that is the obvious answer re read the question"
Option4 = false
else
Output" that is incorrect try again"
Option4 = false
practice pseudocode for text based game 2
continued
Output "you are in a hallway, out of the window in front of you there is a destroyed city and horrifying monsters"
Option2 = false
while Option2 = false
Move2 = "there is a wall to your right and a hall to your left what do you do"
If Move2 = left then
Output "you are in a large room with stairs in front of you"
Option2 = true
else then
Output "that isn't an option"
Option2 = false
Output "you are in a hallway, out of the window in front of you there is a destroyed city and horrifying monsters"
Option2 = false
while Option2 = false
Move2 = "there is a wall to your right and a hall to your left what do you do"
If Move2 = left then
Output "you are in a large room with stairs in front of you"
Option2 = true
else then
Output "that isn't an option"
Option2 = false
Friday, 28 October 2016
practice pseudo code for text base game1
Begin
Input Name
Output "you are in an unknown room to your left is a door"
Option1 = false
While Option1 = false
Move1 = "what do you do?"
If Move1 = left Then
Output "The door has a note on it that reads"
Question1 = "a ball is dropped from the 64th floor of a building if each bounce is half that of the last how many bounces will it take to reach the 2nd floor"
If Question1 = 5 Then
Output " well done"
Option1 = true
Else
Output "try again"
Option1 = false
Input Name
Output "you are in an unknown room to your left is a door"
Option1 = false
While Option1 = false
Move1 = "what do you do?"
If Move1 = left Then
Output "The door has a note on it that reads"
Question1 = "a ball is dropped from the 64th floor of a building if each bounce is half that of the last how many bounces will it take to reach the 2nd floor"
If Question1 = 5 Then
Output " well done"
Option1 = true
Else
Output "try again"
Option1 = false
Tuesday, 25 October 2016
half term blog 1
the first one is -111000011110 + 110011100011 = 111011000000 or 2756
the second one is 001110 * 01 = 0001110 or 14
half term blog 1
the first one is -111000011110 + 110011100011 = 111011000000 or 2756
the second one is 001110 * 01 = 0001110 or 14
Monday, 17 October 2016
Thursday, 13 October 2016
Monday, 10 October 2016
Wednesday, 5 October 2016
Subscribe to:
Posts (Atom)





