as/a level computer science induction task · 1 | p a g e as/a level computer science induction...
TRANSCRIPT
1 | P a g e
AS/A Level Computer Science
Induction Task
Introduction: Are you interested in how computers work? Are you interested in how computers
can be programmed to do the tasks people need? Do you know how the Internet can
be used to generate, store and send information anywhere in the world? Are you
aware of the implications associated with the use of computer systems? You will be
able to investigate such issues on this course through theoretical analysis and
hands-on practical work. If you want to learn about hardware, software and how to
write your own programs then AS/A Level Computer Science is the course for you.
We look forward to getting started with you in September,
Mrs Gillooly Mrs Dimoline
Head of Computing & ICT Teacher of A level Computing & ICT
Task: There are two sections on the following pages. The first section is the class
activity based on programming in console mode; this will be used in the AS
year. The second section is your Summer Homework, which you will need to
complete ready for submission on the first day of lesson in September 2016.
Resources: You will need to download Visual Studio Express 2013 for Windows Desktop (https://www.microsoft.com/en-gb/download/details.aspx?id=44914) to complete the summer homework.
Due: In your first lesson in September.
2 | P a g e
Activities: Console Mode Basics of programming Objective
We will be looking at programming basics in order to promote good programming technique. We will be looking at the summer homework.
Outcome You will have covered the summer homework and learnt how to construct a basic
program in the manner expected by the exam board.
Getting started
Task 1 – Print to screen
Output Code
Module Module1 Sub Main() __________________________________________________ Console.ReadLine() End Sub End Module
Task 2 – Read and store an input
Output Code
Module Module1 Sub Main() Dim num1 As Integer Console.WriteLine("Hello Woodhouse") ________________________________________________ Console.ReadLine() End Sub End Module
3 | P a g e
Task 3 – Multiplying two number inputs
Output Code
Module Module1 Sub Main() Dim num1, num2, Ans As Integer Console.WriteLine("Hello Woodhouse") Console.WriteLine("Please enter a number") num1 = Console.ReadLine() Console.WriteLine("Please enter another number") num2 = Console.ReadLine() Ans = num1 * num2 Console.WriteLine("The product of the numbers is: " & Ans) Console.ReadLine() End Sub End Module
Challenge: Loops
Task 4 - Printing asterisks based on number entered by user
Write a program that asks the user to input a number between 1– 20.
Get your program to display that many stars on screen – see the screenshot below:
HINT: Use a For Loop, see
example below.
What is a loop?
A loop is a sequence of instructions that is
continually repeated until a certain condition is
reached.
Example: This For loop below
For a = 10 To 20
Console.WriteLine("value of a: {0}", a)
Next
value of a: 10
value of a: 11
value of a: 12
value of a: 13
value of a: 14
value of a: 15
value of a: 16
value of a: 17
value of a: 18
value of a: 19
value of a: 20
4 | P a g e
SUMMER HOMEWORK
To start… Install Visual Studio Express 2013 for Windows Desktop (https://www.microsoft.com/en-
gb/download/details.aspx?id=44914).
During installation you might be asked to select the environment you want, select General Development Settings.
NOTE: Visual Studio cannot be used on Macs, read this page for more details on how to use VS on Macs. New Console Based Program
Select Console Application and then name your application as ‘SummerHW’. Then click OK. You are now ready to type your program.
5 | P a g e
Homework Task:
How and what to submit?
Use the following template to compile your answers.
Name:
AS/A Level Computer Science Summer Homework
Program
Code:
Output Screen:
Additional Resources:
https://www.youtube.com/watch?v=pduCFX2O30o
https://www.youtube.com/watch?v=Jj-UqQsiN9w
REMINDER:
Print the template with answers ready for submission on the first
day of lesson in September.
Write a program that asks the user to input two positive whole numbers. Your program will then add these two numbers and return a message to screen to tell the user the answer.