← Back
Code Challenge 17 - Sample Data Generator
Introduction
Generating sample data is incredibly useful when testing algorithms or for automating data entry when debugging an application. The purpose of this app is to help a user generating large numeric data samples that can be copy and pasted into an application, or even saved to a file.
Skills to Practice
- Generating random numbers
- Appending data to a list
- Sorting data in a list
Challenge Tasks
- Create a console project named CodeChallenge17SampleData.
- Ask the user for a minimum and maximum number. Your sample data should be in the range of these numbers.
- Ask the user how much data to generate. i.e. The response 500 should generate 500 sample numbers.
- Ask the user if they want the data sorted before displaying it.
- Create a list and insert n number of sample data elements, where n is the quantity of data the user was prompted for.
- Display the data according to the user’s answers.
Sample Output