Initials · 姓名首字母
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
This one builds on a lesson you haven't finished yet. Do that lesson first: · 此任务基于您尚未完成的课程。请先完成以下课程:
Python Basics · Python 基础 · Working with strings · 处理字符串 →
English
Initials
first is "ada" and last is "lovelace". Store "A.L." in initials — each first letter, capital, each followed by a dot.
Three ideas at once: take a character, make it uppercase, join pieces with +. Build it one step at a time and print what you have so far if it goes wrong.
中文
姓名首字母
first 是 "ada",last 是 "lovelace"。把 "A.L." 存进 initials —— 各取首字母,大写,每个后面加一个点。
三个想法合在一起:取一个字符、变成大写、用 + 把几段连起来。一步一步搭,如果不对就先打印出当前的结果看看。
first is "ada" and last is "lovelace". Store "A.L." in initials — each first letter, capital, each followed by a dot. · first 是 "ada",last 是 "lovelace"。把 "A.L." 存进 initials —— 各取首字母,大写,每个后面加一个点。
Click Run to see the output here. · 点击“运行”查看此处输出。