BestPromptFinder
HomeCoding › Below is an instruction that describes a task. Write a respo...

Below is an instruction that describes a task. Write a respo...

Coding · Gemini, GPT-5.6, Claude · Coding
56Quality
88%Useful
85Reliability

The prompt

Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Create a Python function that takes in a text string and returns a dictionary of words and the number of times each word appears in the text string. ### Input: A quick brown fox jumps over the lazy dog ### Output: def words_count(text): words_dict = {} for word in text.split(' '): if word in words_dict: words_dict[word] += 1 else: words_dict[word] = 1 return words_dict words_dict = words_count("A quick brown fox jumps over the lazy dog") print(words_dict)
Find similar in the app →

Why this prompt

Source

Hugging Face

Related Coding prompts

PRD to MVP Technical Plan
Quality 93 · Claude Code
Full-Stack CRUD App Builder
Quality 93 · Claude Code
Legacy Refactor Planner
Quality 93 · Claude Code
Test Suite Generator
Quality 93 · Claude Code
Third-Party API Integration
Quality 93 · Claude Code
Database Schema and Migration
Quality 93 · Claude Code