This covers details on Writing Pascal using Lazarus.
A teaching resource for students without any previous experience.
Originally written for AQA A level Computing (UK exam).
79. Drag & drop Click on button to select “button” Drag and drop button on form Object inspector used to change properties
80. Edit properties Change “text” property to change the default contents Look at other properties for ideas Commonly used properties are displayed under “favourites” Don’t forget to find the “name” property to give each item a memorable name (see the slide with the boxes & buttons labelled for ideas Events are used for things like “on click”
81.
82.
83.
84.
85.
86.
Hinweis der Redaktion
Details of exercises for marking and checking: Exercise A 1. Have a go at altering the output text adding extra text and outputting variables. 2. Ask the user for two numbers and display them as follows: Exercise B Write code to take two numbers input. Add them together displaying the result. Multiply them displaying the result. Divide them displaying the result. Subtract them displaying the result. Exercise C Write an application (using if) to take a number input and output if the number is: “ smaller than 100” “ Between 100 and 200” “ Bigger than 200” Exercise D Rewrite the following if statements as a Case statement. Exercise E Using for loops write an application to produce the output(s): Exercise F Write a while loop to display the following output: Write a while loop to produce the below output: Write a while loop to ask a user to enter a number till they enter a number over 20 Exercise G Write an application to create 3 records storing the following aspects of people: Name Age Gender Nationality Ask a user to enter this information Output the name of the oldest person Exercise H Use an array to take in 10 numbers from a user. Output the largest number Output the smallest number Output the average number Exercise I Write an application that takes in two numbers Using a procedure produce a welcome message Using a function add the two numbers together outputting the result Using a function multiply the two numbers outputting the result