/**
 * The carpenter wants to calculate the total time taken to complete a certain number of pieces.
 * Each piece requires a certain number of strokes, and each stroke takes a certain amount of time.
 * Complete the function calculateTimeTaken to return the total time taken to complete all the pieces.
 *
 * @param numPieces an integer representing the number of pieces to be completed.
 * @param numStrokes an integer representing the number of strokes required to complete each piece.
 * @param timePerStroke a float representing the time taken for each stroke.
 * @return timeTaken a float representing the total time taken to complete all the pieces.
 *
 * Example:
 * calculateTimeTaken(5, 10, 0.5)
 * Output: 25.0
 */
fun calculateTimeTaken(numPieces: Int, numStrokes: Int, timePerStroke: Float): Float {

    var timeTaken = 0.0f

    // Nested loop to iterate over each piece and its strokes
    repeat(numPieces) { piece ->
        repeat(numStrokes) { stroke ->
            timeTaken += timePerStroke
        }
    }

    return timeTaken
}
/**
 * The carpenter wants to calculate the total time taken to complete a certain number of pieces.
 * Each piece requires a certain number of strokes, and each stroke takes a certain amount of time.
 * Complete the function calculateTimeTaken to return the total time taken to complete all the pieces.
 *
 * @param numPieces an integer representing the number of pieces to be completed.
 * @param numStrokes an integer representing the number of strokes required to complete each piece.
 * @param timePerStroke a float representing the time taken for each stroke.
 * @return timeTaken a float representing the total time taken to complete all the pieces.
 *
 * Example:
 * calculateTimeTaken(5, 10, 0.5)
 * Output: 25.0
 */
fun calculateTimeTaken(numPieces: Int, numStrokes: Int, timePerStroke: Float): Float {
/**
 * The carpenter wants to calculate the total time taken to complete a certain number of pieces.
 * Each piece requires a certain number of strokes, and each stroke takes a certain amount of time.
 * Complete the function calculateTimeTaken to return the total time taken to complete all the pieces.
 *
 * @param numPieces an integer representing the number of pieces to be completed.
 * @param numStrokes an integer representing the number of strokes required to complete each piece.
 * @param timePerStroke a float representing the time taken for each stroke.
 * @return timeTaken a float representing the total time taken to complete all the pieces.
 *
 * Example:
 * calculateTimeTaken(5, 10, 0.5)
 * Output: 25.0
 */
fun calculateTimeTaken(numPieces: Int, numStrokes: Int, timePerStroke: Float): Float {

    var timeTaken = 0.0f

    // Nested loop to iterate over each piece and its strokes
    repeat(numPieces) { piece ->
        repeat(numStrokes) { stroke ->
            timeTaken += timePerStroke
        }
    }

    return timeTaken
}