Loading...
    • 개발자 가이드
    • API 참고자료
    • MCP
    • 리소스
    • 릴리스 노트
    Search...
    ⌘K

    리소스

    overview용어집시스템 프롬프트

    사용 사례

    개요티켓 라우팅고객 지원 에이전트콘텐츠 조정법률 문서 요약

    프롬프트 라이브러리

    프롬프트 라이브러리우주 키스트로크기업 투시자웹사이트 마법사Excel 수식 전문가Google 앱스 스크립터Python 버그 해결사시간 여행 컨설턴트스토리텔링 조수출처 인용하기SQL 마법사꿈 해석가말장난 전문가요리 창작자혼성어 시인유머러스한 도우미 HalLaTeX 전문가무드 컬러라이저Git gud직유 전문가윤리적 딜레마 내비게이터회의 서기관용구 해설자코드 컨설턴트함수 제작기신조어 창조자CSV 변환기이모지 인코더산문 다듬기관점 숙고자퀴즈 생성기마음챙김 멘토초등학교 2학년 수준 단순화기VR 피트니스 혁신가PII 정화기메모 마에스트로커리어 코치채점 전문가발음하기 어려운 말면접 질문 작성자문법 지니수수께끼를 내어보세요코드 명확화기외계 인류학자데이터 정리기브랜드 빌더효율성 추정기리뷰 분류기방향 디코더동기부여 뮤즈이메일 추출기마스터 모더레이터수업 계획서 작성자소크라테스식 현자두운 연금술사미래지향적 패션 어드바이저다국어 초능력제품명 작성 전문가철학적 사색스프레드시트 마법사공상과학 시나리오 시뮬레이터적응형 편집기Babel의 방송트윗 톤 감지기공항 코드 분석기
    Console
    프롬프트 라이브러리

    Python 버그 해결사

    Python 코드의 버그를 감지하고 수정합니다.

    이 프롬프트를 개발자 Console에 복사하여 직접 시도해보세요!

    내용
    System제공된 Python 코드 스니펫을 분석하고, 존재하는 버그나 오류를 식별하며, 이러한 문제를 해결하는 수정된 버전의 코드를 제공하는 것이 당신의 임무입니다. 원본 코드에서 발견한 문제점과 수정 사항이 이를 어떻게 해결하는지 설명하세요. 수정된 코드는 기능적이고 효율적이며 Python 프로그래밍의 모범 사례를 준수해야 합니다.
    Userdef calculate_average(nums):
    sum = 0
    for num in nums:
    sum += num
    average = sum / len(nums)
    return average

    numbers = [10, 20, 30, 40, 50]
    result = calculate_average(numbers)
    print("The average is:", results)

    예시 출력

    수정된 Python 코드:

    Python
    def calculate_average(nums):
        total = 0
        for num in nums:
            total += num
        average = total / len(nums)
        return average
    
    numbers = [10, 20, 30, 40, 50]
    result = calculate_average(numbers)
    print("The average is:", result)

    설명:

    1. 내장 Python 함수 "sum()"을 사용하지 않도록 변수명 "sum"을 "total"로 변경했습니다.
    2. print 문의 오타를 수정하여 "results"를 "result"로 변경하여 변수를 올바르게 참조하도록 했습니다.

    API 요청

    • API 요청
    © 2025 ANTHROPIC PBC

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    © 2025 ANTHROPIC PBC