Westonci.ca is the Q&A platform that connects you with experts who provide accurate and detailed answers. Join our platform to connect with experts ready to provide precise answers to your questions in different areas. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

In the Small Basic programming language, please explain how one would add up the sum of any
number of data points. Meaning, that, depending on user input (the amount of data points there are) and the data (the entered data for each data point) I can calculate the sum, regardless of how many there are. Is there a way to do this?

Sagot :

acid
Simply put both values as variables. It's been a long time since I used small basic, as it was only used as an introductory language (I use Python, now)

userInputVariable  +  dataPointVariable

A key point to remember for the written theory exam is when the variables are strings, this process is called concatenation.