Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Simple Programming Variables.

Similar presentations


Presentation on theme: "Programming Simple Programming Variables."— Presentation transcript:

1 Programming http://www.yahmad.co.uk/ Simple Programming Variables

2 Programming Unit Overview http://www.yahmad.co.uk/ Objectives Understand why computer programming scripts are used. Understand the use of Variables as place holders for information. Understand the difference between the string and a integer variable. OutcomesTime Task 1 Using Variables Task 2 Joining variables and Printing Variables Task 3 Adding Numbers Task 4 Employee Pay Task 5 Extension

3 Programming Variables Overview http://www.yahmad.co.uk/ Total Number1 Number2 Variables are used to store data (Text/Numbers) in scratch and in programming. In the Number task three variables are required to store the 1 st and 2 nd number. The 3 rd variable is used to store the sum of the two numbers contained in the variables.

4 Programming Task 1 – Using Variables http://www.yahmad.co.uk/ 1.You need to create a simple program to enter data into variables. 2.You will be required to print each variable.

5 Programming Task 2 – Joining variables and Printing Variables 1.You need to create a simple program to enter data into variables 2.You will include the print the variables as part of sentence. Create your own program. User will be prompted to input answers for specific questions into variables. You can ask up to 6 different questions. Print the variables as part of a sentence.

6 Programming Task 3 – Adding Numbers http://www.yahmad.co.uk/ 1.You need to create a simple program to calculate two numbers together. 2.You need to create variables to store each number and the total. 3.Your program will have to allow the user to input two different numbers. Extension: Multiply the entered numbers and print on separate line.

7 Programming Task 4 – Employee Pay http://www.yahmad.co.uk/ 1.You will be making a program to work out the employees weekly and monthly pay. 2.You need to include suitable variables including: 1.Name 2.Job Type (part time/fulltime) 3.Hours (per week) 4.Payperhour 5.Weeklypay = Hours * Payperhour 6.Monthlypay = Weeklypay * 4 3.You need to print the following statement: 1.Your name is __________. You are a __________ employee. 2.You have worked _______ hours this week and your pay per hour is _____. 3.Your weekly pay is _______. Your monthly pay is ________.

8 Programming Task 5 - Extension http://www.yahmad.co.uk/ Can you make your own program containing variables?

9 Programming Plenary – Refer to the Lesson Objectives http://www.yahmad.co.uk/ Plenary Task (Q&A) Peer assess each other scripts. Discuss the levels pupils have achieved for this task. Question: What is the purpose of variables? Objectives Understand why computer programming scripts are used. Understand the use of Variables as place holders for information. Understand the difference between the string and a integer variable.


Download ppt "Programming Simple Programming Variables."

Similar presentations


Ads by Google