L1 PDF
Document Details
Tags
Summary
This document covers fundamental programming concepts including syntax, operators, data types, input/output, selection, and repetition. The document likely serves as lecture notes or study material for a computer science course.
Full Transcript
L1 Syntax – Rules for writing a program in a particular language. Operator – Symbol representing a function that calculates a value. Operand – Value to the left or right of an operator. Promotion – Changing the data type of a variable so that it can hold more information. Demotion – Changing the da...
L1 Syntax – Rules for writing a program in a particular language. Operator – Symbol representing a function that calculates a value. Operand – Value to the left or right of an operator. Promotion – Changing the data type of a variable so that it can hold more information. Demotion – Changing the data type of a variable so that it loses information. Type Casting – A way to temporarily and explicitly change the data type of a variable. L2 Input – Information from the user to the program. Output – Information from the program sent to the user. Prompt – Request for user to input information. Relational Operators – Operators that result in either a TRUE or FALSE calculation. Selection – A concept to select whether code will execute or not. L3 Repetition – A concept to repeat code until a condition is met. Sentinel Controlled Loop – A loop that repeats until a specific value is seen. Counter Controlled Loop – A loop that repeats until a variable goes beyond a set threshold. Array – An ordered arrangement of data within one variable. String – An array of characters. Counters – Variables used within a loop to count by a set amount. Accumulators – Variables within a loop that accumulate data over the loop.