benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf 7a69159b-128e-5d2b-80fe-05b4bdaabd30

Problem

Answer published by the source. Consult the official source to check your work against its answer.

complete prompt

import re
import string

def task_func(content):
    """Count the non-stop words in a sentence without the last word.

    Parameters:
    - content (str): The sentence to count non-stopwords from.

    Returns:
    - count (int): The count of non-stopwords.

    Requirements:
    - re
    - string

    Example:
    >>> task_func('this is an example content')
    1
    """

instruct prompt

Count the non-stop words in a sentence without the last word.
The function should output with:
    count (int): The count of non-stopwords.
You should write self-contained code starting with:

Code

import re
import string
def task_func(content):

code prompt

Code

import re
import string
def task_func(content):

entry point

task_func

libs

  • string
  • re

Discussion

Discussion

No discussion posts on this page yet. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Source and history

Official source

initial import