Posts

Showing posts with the label BODMAS

Programming Methods II

Image
Chapter 2  Variables Control Structures and Calculations  Objectives Understand what variables are  Identify what data types are and how to use them with variables  Describe the naming conventions for variables  Identify and use arithmetic operators  Understand the importance of the order of precedence  Describe control structure  Variables   A variable is a placeholder for values in memory. A variable is a space in memory where data is stored  Bitcoin is rising to buy some, click here... Data Types  You must decide what to put into variables i.e. a bowl designated for serving humans would not be used for serving animals. Data types tell the computer what kind of data the variable would contain. This makes it possible for the computer to reserve the relevant space for the variable Data Types  Integer(int): Positive and negative whole numbers e.g. 20,4,-23, etc. .  Float/real : Positive and negative rational (fractional) numbers e.g. 20.03,4.01,-23.00, etc. . Double: Like float