안드로이드 Pydroid 환경에서 동작하는 모바일용 CLI 앱 파이썬 스크립트를 작성합니다.
Act as a professional Python coder. You are one of the best in your industry and currently freelancing. Your task is to create a Python script that works on an Android phone using Pydroid 3. Your script should: - Provide a menu with options for checking updates: system updates, security updates, Google Play updates, etc. - Allow the user to check for updates on all options or a selected one. - Display updates available, let the user choose to update, and show a progress bar with details such as update size, download speed, and estimated time remaining. - Use colorful designs related to each type of update. - Keep the code under 300 lines in a single file called app.py. - Include comments for clarity.
전문 파이썬 프로그래머로서 역할을 수행하세요. 당신은 업계 최고의 프리랜서입니다. 당신의 작업은 Pydroid 3를 사용하여 안드로이드 폰에서 작동하는 파이썬 스크립트를 생성하는 것입니다. 스크립트 요구사항: - 시스템 업데이트, 보안 업데이트, Google Play 업데이트 등 업데이트 확인 옵션 메뉴를 제공하세요. - 사용자가 전체 옵션 또는 선택한 옵션의 업데이트를 확인할 수 있도록 하세요. - 사용 가능한 업데이트를 표시하고, 사용자가 업데이트를 선택하게 하며, 업데이트 크기, 다운로드 속도, 남은 예상 시간 등의 세부 정보가 담긴 진행률 표시줄을 보여주세요. - 각 업데이트 유형과 관련된 색상 디자인을 사용하세요. - app.py라는 단일 파일로 300줄 이내의 코드를 작성하세요. - 명확한 설명을 위해 주석을 포함하세요.
출처 · prompts.chat · Android Update Checker Script for Pydroid 3 — 원문은 출처에 게시된 그대로이며, 권리는 원작자에게 있습니다.
Gemini로 실행한 결과입니다. 입력 항목에는 국내 환경의 예시값을 적용했습니다(AI 생성 — 사실 확인 필요).
Act as a professional Python coder. You are one of the best in your industry and currently freelancing. Your task is to create a Python script that works on an Android phone using Pydroid 3. Your script should: - Provide a menu with options for checking updates: system updates, security updates, Google Play updates, etc. - Allow the user to check for updates on all options or a selected one. - Display updates available, let the user choose to update, show a progress bar with details such as update size, download speed, and estimated time remaining. - Use colorful designs related to each type of update. - Keep the code under 300 lines in a single file called app.py. - Include comments for clarity.
Pydroid 3 터미널에서 동작하는 안드로이드 업데이트 시뮬레이터 app.py 코드입니다. ANSI 터미널 색상 및 진행률 표시바(크기, 속도, ETA)가 포함되어 있습니다.
# app.py - Pydroid 3용 안드로이드 업데이트 시뮬레이터
import time, sys
# 터미널 ANSI 색상 정의
RED, GREEN, YELLOW, CYAN, RESET = "\033[31m", "\033[32m", "\033[33m", "\033[36m", "\033[0m"
def run_update(name, size_mb):
"""업데이트 진행률 및 다운로드 정보를 시뮬레이션합니다."""
print(f"
{CYAN}[다운로드 시작] {name} ({size_mb}MB){RESET}")
downloaded, speed = 0.0, 20.0 # 초당 20MB 속도 가정
while downloaded < size_mb:
time.sleep(0.1)
downloaded = min(size_mb, downloaded + speed * 0.1)
percent = int((downloaded / size_mb) * 100)
bar = "█" * (percent // 5) + "░" * (20 - percent // 5)
eta = int((size_mb - downloaded) / speed)
sys.stdout.write(
f"\r[{GREEN}{bar}{RESET}] {percent}% | {downloaded:.1f}/{size_mb}MB | {speed}MB/s | 남은시간: {eta}s"
)
sys.stdout.flush()
print(f"
{GREEN}✔ {name} 설치가 완료되었습니다.{RESET}
")
def main():
updates = {
"1": ("안드로이드 시스템 업데이트", 650, RED),
"2": ("보안 패치 업데이트", 150, YELLOW),
"3": ("Google Play 시스템 업데이트", 85, GREEN)
}
while True:
print(f"{CYAN}=== Android Update Manager ==={RESET}")
for k, (v, s, color) in updates.items():
print(f"{color}{k}. {v} ({s}MB){RESET}")
print("4. 모든 업데이트 실행
0. 종료")
choice = input("
메뉴를 선택하세요: ").strip()
if choice == "0":
print("프로그램을 종료합니다.")
break
elif choice in updates:
run_update(updates[choice][0], updates[choice][1])
elif choice == "4":
for name, size, _ in updates.values():
run_update(name, size)
else:
print(f"{RED}올바른 번호를 입력하세요.{RESET}
")
if __name__ == "__main__":
main()mopick 개선안
원문을 그대로 넣으면 AI 가 매번 다르게 답하거나 중요한 부분을 빠뜨릴 수 있습니다. 개선안은 원문의 뜻과 언어는 그대로 두고 역할 · 바꿔 넣을 입력 칸 · 결과 형식 · 지킬 조건을 보완해 다시 쓴 버전입니다. 원문과 같은 곳(ChatGPT · Claude 등)에 그대로 붙여 넣어 쓰면 됩니다.
AI 자체 평가 — 개선안을 쓴 AI 가 명확성 · 구체성 · 결과 형식 · 재사용성 기준(100점)으로 직접 매긴 점수 · 결과를 돌려 검증한 값은 아님
이 개선안에 쓰인 기법 — 프롬프트 클래스에서 배우기
원문
Act as a professional Python coder. You are one of the best in your industry and currently freelancing. Your task is to create a Python script that works on an Android phone using Pydroid 3. Your script should: - Provide a menu with options for checking updates: system updates, security updates, Google Play updates, etc. - Allow the user to check for updates on all options or a selected one. - Display updates available, let the user choose to update, and show a progress bar with details such as update size, download speed, and estimated time remaining. - Use colorful designs related to each type of update. - Keep the code under 300 lines in a single file called app.py. - Include comments for clarity.
개선안 · 색칠한 [칸]에 내 내용을 넣어 쓰세요
Act as a senior Python developer specializing in mobile CLI tools for Pydroid 3 on Android.
Task: Write a single-file Python script (`app.py`, max 300 lines) that simulates an Android Update Manager.
Context & Requirements:
- Environment: Pydroid 3 terminal (use standard library only, e.g., `time`, `random`, `sys`).
- Menu: Interactive CLI menu to check for System, Security, and Google Play updates (Allow checking all or specific items).
- Simulation Logic: Display available mock updates, let the user select items, and show an animated CLI progress bar detailing update size (MB), download speed (MB/s), and ETA.
- Visuals: Use ANSI color codes to create color-themed outputs corresponding to each update type.
- Quality: Include concise inline comments and handle basic user input errors.
Output Format: Provide only the ready-to-run Python code block for `app.py`.