惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
A
About on SuperTechFans
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LangChain Blog
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - viphhs

【不好分类】第四届全国数据安全职业竞赛网络与信息安全管理员赛道 初赛 wp [读些好书]多年前张晓楠推荐的书,《追逐日光》 [办公自动化]我用workbuddy做什么-人工智能月报调研 【AI大模型】ai-bot.cn 【办公自动化】微软开源的Powertoys,可以探索其中的AI能力 【学点AI】跟着Trae官方学做项目 [职称英语考试]参加2026年4月中国石化专业技术人员外语水平考试后记及成绩查询 [读书笔记]如何汇报?如何回应批评?如何面对一堆说不清楚的任务?读脱不花《干得漂亮》有感 [网络安全]Zoomeye 永久社区版使用及购买指南(含注册邀请码) [办工自动化]免费的pdf编辑工具 [ctf入门]记录那些傻x的题目 [动手做做题]长期更新,题目来自各大佬 备赛数据安全大赛2025 miniforge 与vs code联动 [网络安全]知攻知攻善防应急响应靶场-linux2 【CTF】RCE-labs [办公自动化]我和DeepSeek的对话3,学习RSA [办公自动化]我和deepseek的问答2 [办公自动化]我和DeepSeek的问答1 [办公自动化]deepseek解决不了的问题,“帮忙找到丢失的word文件” [ctf]跟着风二西复现NSSCTF流量题目 [CTF]2024 强网杯青少年专项赛 writeup [CTF]网鼎杯2024半决赛复盘 [ctf]buuoj 使用dirsearch扫描目录报错429该如何办?
[学点编程]python workout,每天10分钟学会python 读书笔记
viphhs · 2026-03-10 · via 博客园 - viphhs

python workourt第一章

预备知识

enumberate

scores = [75, 88, 92, 67, 95, 83, 79]
index = 0
for score in scores:
    if score >85:
        print(score)
        print(index)
    index = index + 1
scores = [75, 88, 92, 67, 95, 83, 79]
print("高分榜:")
for index, score in enumerate(scores):
    if score >80:
        print(f'第{index+1}个学生的成绩是{score}')

我的答案

import random
def guessing_game():
    number = random.randint(0,100)
    while True:
        user_input = input("请输入你的答案:")
        if int(user_input)> number:
            print("Too high")
        elif int(user_input)< number:
            print("Too low")
        else:
            print("Just Right")
            break

guessing_game()