levo

Programming

Data types

  • 3 things to know
  • Paper 1
Start revising · £5/month

Overview

Integer, real, Boolean, character and string, choosing the right type for a phone number, a price or a grade, and why 7 + 3 and '7' + '3' give different results.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is a data type?

Key term

What is the integer data type?

Key term

What is the real data type?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a data type?

    Model answer

    A data type sets the kind of value a variable can hold. The data type also decides which operations can be carried out on that value.

  2. 2

    What is the integer data type?

    Model answer

    An integer is a whole number with no fractional part. Integers can be positive, negative or zero, such as 42, 0 and −7.

  3. 3

    What is the real data type?

    Model answer

    A real is a number that can have a fractional part, such as 3.75 or −0.5. Some languages call a real a float.

  4. 4

    What is the Boolean data type?

    Model answer

    A Boolean holds only one of two values, True or False. Booleans are used in conditions and to record whether something has happened.

  5. 5

    What is the character data type?

    Model answer

    A character is a single letter, digit, symbol or space. Examples of characters are 'A', '7' and '#'.

  6. 6

    What is the string data type?

    Model answer

    A string is a sequence of characters, such as a name or a sentence. A string can also be empty, holding no characters at all.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Algorithms
Programming
Data Representation
Computer Systems

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

The table one extra row.
gainslosescopies

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

ASC means sorting from smallest to largest, or A to Z.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Programming, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.