benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf 7b281676-8264-5a86-8d64-9559bac977d9

Problem

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

complete prompt

import wikipedia
from wordcloud import WordCloud
import matplotlib.pyplot as plt

def task_func(page_title):
    """
    Create a word cloud from the text of a Wikipedia page.

    Parameters:
    page_title (str): The title of the Wikipedia page.

    Returns:
    matplotlib.axes.Axes: The Axes object of the plotted data. Is None if there is no wikipedia page with the title given as input.

    Requirements:
    - wikipedia
    - wordcloud.WordCloud
    - matplotlib.pyplot

    Example:
    >>> ax = task_func('Python (programming language)')
    """

instruct prompt

Create a word cloud from the text of a Wikipedia page.
The function should output with:
    matplotlib.axes.Axes: The Axes object of the plotted data. Is None if there is no wikipedia page with the title given as input.
You should write self-contained code starting with:

Code

import wikipedia
from wordcloud import WordCloud
import matplotlib.pyplot as plt
def task_func(page_title):

code prompt

Code

import wikipedia
from wordcloud import WordCloud
import matplotlib.pyplot as plt
def task_func(page_title):

entry point

task_func

libs

  • wikipedia
  • matplotlib
  • wordcloud

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