Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

what is the main purpose of a boolean data type in a program? d) to per…

Question

what is the main purpose of a boolean data type in a program?
d) to perform complex multiplication.
b) to represent quantities with decimals.
a) to store long paragraphs of text.
c) to control logic and decision - making.
question 5
what is the key difference between a real number and an integer?
a) real numbers can be negative.
c) real numbers include decimals or fractions.
d) integers are processed faster by the cpu.
b) integers can only be used for counting.

Explanation:

Brief Explanations

A Boolean data type in programming has two values, true and false, and is mainly used for conditional statements and decision - making in control flow. Real numbers include integers but also fractions and decimals, while integers are whole numbers (positive, negative, or zero).

Answer:

  1. C) To control logic and decision - making
  2. C) Real numbers include decimals or fractions