0% found this document useful (0 votes)
6 views2 pages

Data Types

This document provides a cheatsheet on the basics of programming, focusing on data types such as numbers, strings, and booleans. It explains how these data types function, including the use of the logical AND operator and the concept of variables in programming. Additionally, it covers how to declare and assign values to variables.

Uploaded by

Frank Paing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Data Types

This document provides a cheatsheet on the basics of programming, focusing on data types such as numbers, strings, and booleans. It explains how these data types function, including the use of the logical AND operator and the concept of variables in programming. Additionally, it covers how to declare and assign values to variables.

Uploaded by

Frank Paing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0720128, 11:47 AN Learn How to Code: Basis of Programming | Cheatsheet | Codcademy Cheatsheets / Learn How to Code Basics of Programming | Data Type Definition In programming, data types are how computers classify different forms of information. They include numeric, string and boolean types. For example, if using number data type, the program wil know that arithmetic can be performed on it, but it can’t be capitalizes Numbers definition In programming, numbers are a common data type. They represent numerleal values and ean include numbers with and without decimal points case String Definition In programming, strings are a common data type. They are any sequence of characters (letters, spaces, numbers, ‘r symbols) surrounded by single or double quotes, ‘Strings are commonly used to represent text, speech, symbols, and other non-numerical characters. Booleans Definition In programming, booleans are a common data type. They represent the logical ideas of truc and false [Link]-how-te-codeimedulesrbop-cheatshee 0720028, 11:47 AN Learn How to Code: Basis of Programming | Cheatsheet | Codcademy AND Operator In programming, the logical AND operator { && ) ‘compares two values. It returns true when both values evaluate to true and false otherwise. The following evaluates to true: grass is green AND fire is red 2>1AND 6>53== SAND == 8 While this evaluates to false: trees are large AND ant are massive § <4 AND 6>37==7ANDO==9 Variable Definition In programming, variables are used to assign a name to a piece of data and to use that name to reference the data ‘elsewhere in the program. Variable Declaration In programming, variables are declared by giving it name and setting it to a value using an equals sign =’. Variables can later be reassigned to other values. Print a Share v nitpsswww:codecademy,comiearnlear-how-te-codeimedulesrbop-cheatshee ae

You might also like