Skip to content

Conversation

@holinkasa
Copy link

Implements #12924

Implements #12878

Implements #12863

Implements #12806

Implements #12717

Implements #12659

Implement Indexed Sum Calculation Function

Task

Create a function called calculate_sum that takes in a list of integers as its parameter (my_list). The function should return the sum of all numbers in the list, where each number is multiplied by its index before being added to the sum.

Acceptance Criteria

All tests must pass. The function must take a list of integers as input. The implementation must multiply each number by its corresponding index. The function must handle lists of varying lengths. Invalid inputs (non-list) should return an error.

Summary of Changes

Added a new function calculate_sum that calculates the sum of a list of integers, where each number is multiplied by its index. Implemented input validation and edge case handling.

Test Cases

  • Verify the function returns correct sum for a list of integers
  • Check that the function multiplies each number by its index correctly
  • Ensure the function works with lists of different lengths
  • Test error handling for invalid input types

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

Implements koii-network#12924

Implements koii-network#12878

Implements koii-network#12863

Implements koii-network#12806

Implements koii-network#12717

Implements koii-network#12659

# Implement Indexed Sum Calculation Function

## Task
Create a function called `calculate_sum` that takes in a list of integers as its parameter (`my_list`). The function should return the sum of all numbers in the list, where each number is multiplied by its index before being added to the sum.

## Acceptance Criteria
All tests must pass. The function must take a list of integers as input. The implementation must multiply each number by its corresponding index. The function must handle lists of varying lengths. Invalid inputs (non-list) should return an error.

## Summary of Changes
Added a new function `calculate_sum` that calculates the sum of a list of integers, where each number is multiplied by its index. Implemented input validation and edge case handling.

## Test Cases
 - Verify the function returns correct sum for a list of integers
 - Check that the function multiplies each number by its index correctly
 - Ensure the function works with lists of different lengths
 - Test error handling for invalid input types

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.
holinkasa pushed a commit to holinkasa/prometheus-beta that referenced this pull request May 18, 2025
Implements koii-network#12959

Implements koii-network#12924

Implements koii-network#12878

Implements koii-network#12863

Implements koii-network#12806

Implements koii-network#12717

Implements koii-network#12659

# Implement Indexed Sum Calculation Function

## Task
Create a function called `calculate_sum` that takes in a list of integers as its parameter (`my_list`). The function should return the sum of all numbers in the list, where each number is multiplied by its index before being added to the sum.

## Acceptance Criteria
All tests must pass. The function must take a list of integers as input. The implementation must multiply each number by its corresponding index. The function must handle lists of varying lengths. Invalid inputs (non-list) should return an error.

## Summary of Changes
Added a new function `calculate_sum` that calculates the sum of a list of integers, where each number is multiplied by its index. Implemented input validation and edge case handling.

## Test Cases
 - Verify the function returns correct sum for a list of integers
 - Check that the function multiplies each number by its index correctly
 - Ensure the function works with lists of different lengths
 - Test error handling for invalid input types

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.

This PR was created automatically by a Koii Network AI Agent powered by Together.ai.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant