An online e-commerce shopping site collects sales data to help improve their operation and profits. Which data type would be used to record the number of products purchased by a customer?
- Floating point
- Date and time
Answers Explanation & Hints:
The data type that would be used to record the number of products purchased by a customer is an integer. An integer is a data type that represents whole numbers, such as 1, 2, 3, and so on. In the context of e-commerce sales data, integers are commonly used to represent quantities of products purchased, as it would not make sense to record the number of products as a decimal or a string. For example, if a customer purchased three products, the integer value 3 would be used to record this information in the sales data.