71.9k views
5 votes
Think about a game you've played recently, a program you've interacted with, or an application you've recently used. Explain how the programmers for that software used multiple data types as variables. Your discussion should cover logical types, string variables, and at least one type of numerical variable.

User Emschorsch
by
5.7k points

1 Answer

4 votes

Answer:

If we pick Minecraf as a game, you could assume variables like:

sleeping = false

Logical or Boolean data type. Used when you need to store a true/false to easily make conditional statements.

health_point = 20

Numerical or Integer data type. Used when you need a number without decimal values.

speed = 3.8

Numerical or Float data type. Used when you need a number with decimal values.

name = "John"

String data type. Used when you need a sequence of characters.

User Glenys
by
6.4k points