/**
 * Given a list of words and a number of tuples, generate a list of tuples where each tuple
 * has two words from the given list. The tuples should be randomly selected from the given list,
 * and should not have any duplicates.
 *
 * @param wordList A list of words
 * @param numTuples Number of tuples to generate
 * @return A list of tuples
 *
 * Example:
 * val wordList = listOf("economics", "finance", "invest", "market", "analysis", "trade")
 * val numTuples = 3
 * Output:
 * listOf(Pair("finance", "market"), Pair("invest", "trade"), Pair("economics", "analysis"))
 */
fun economistCode(wordList: List<String>, numTuples: Int): List<Pair<String, String>> {

    val shuffledList = wordList.shuffled()
    val selectedWords = shuffledList.take(2 * numTuples)
    val tuplesList = selectedWords.chunked(2) { Pair(it[0], it[1]) }
    return tuplesList
}
/**
 * Given a list of words and a number of tuples, generate a list of tuples where each tuple
 * has two words from the given list. The tuples should be randomly selected from the given list,
 * and should not have any duplicates.
 *
 * @param wordList A list of words
 * @param numTuples Number of tuples to generate
 * @return A list of tuples
 *
 * Example:
 * val wordList = listOf("economics", "finance", "invest", "market", "analysis", "trade")
 * val numTuples = 3
 * Output:
 * listOf(Pair("finance", "market"), Pair("invest", "trade"), Pair("economics", "analysis"))
 */
fun economistCode(wordList: List<String>, numTuples: Int): List<Pair<String, String>> {
/**
 * Given a list of words and a number of tuples, generate a list of tuples where each tuple
 * has two words from the given list. The tuples should be randomly selected from the given list,
 * and should not have any duplicates.
 *
 * @param wordList A list of words
 * @param numTuples Number of tuples to generate
 * @return A list of tuples
 *
 * Example:
 * val wordList = listOf("economics", "finance", "invest", "market", "analysis", "trade")
 * val numTuples = 3
 * Output:
 * listOf(Pair("finance", "market"), Pair("invest", "trade"), Pair("economics", "analysis"))
 */
fun economistCode(wordList: List<String>, numTuples: Int): List<Pair<String, String>> {

    val shuffledList = wordList.shuffled()
    val selectedWords = shuffledList.take(2 * numTuples)
    val tuplesList = selectedWords.chunked(2) { Pair(it[0], it[1]) }
    return tuplesList
}