Ask for two things · 问两样东西
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 基础 · Getting input · 获取输入 →
English
Ask for two things
Read a colour, then an animal. Print them on one line with a space between: for red and fox, print "red fox".
Each input() reads ONE line, so two things need two calls — and each needs its own variable, or the second overwrites the first.
中文
问两样东西
先读一个颜色,再读一个动物。把它们打印在一行,中间加一个空格:输入 red 和 fox 时,打印 "red fox"。
每个 input() 只读一行,所以两样东西要调用两次 —— 而且各自要有自己的变量,否则第二个会覆盖第一个。
Read a colour, then an animal. Print them on one line with a space between: for red and fox, print "red fox". · 先读一个颜色,再读一个动物。把它们打印在一行,中间加一个空格:输入 red 和 fox 时,打印 "red fox"。
Click Run to see the output here. · 点击“运行”查看此处输出。