070801 - Simple Chat Bot
題目敘述 Problems Description:
請試著完成讓你的程式可以完成依序以下任務:
詢問使用者名稱
跟使用者打招呼
告訴使用者今天星期幾
Try to make your program can finish the following missions:
ask user's name
say hello to user
tell user what day is it
輸入說明 Input Description:
將會輸入兩行字串,第一行為自己的名字,第二行為What day is it?
來詢問今天星期幾。
Input two strings, first one is your name, and second one is What day is it?
to ask the program what day is today.
輸出說明 Output Description:
先輸出"Hi, What's your name?"
來詢問使用者名稱,並且依照輸入的名字向使用者大招呼。在使用者詢問完今天星期幾後,輸出今天星期幾。
若不是使用"What day is it?"
來詢問今天星期幾的話則輸出THX, but I don't know what do you mean, please ask me "What day is it?".
,直到輸入"What day is it?"
為止。
First, print "Hi, What's your name?"
to ask the name of user, and say hello to user with name which you enter. Then print what day is today after enter What day is it?
If you do not use "What day is it?"
to ask the day of the week, output THX, but I don't know what do you mean, please ask me "What day is it?".
until you enter "What day is it?"
.
輸入範例 Input Example:
Terry How are you? What day is it?
輸出範例 Output Example:
Robot: "Hi, What's your name?" You: Robot: "Hello, Terry." You: Robot: "THX, but I don't know what do you mean, please ask me "What day is it?"." You: Robot: "Today is Wednesday."
提示 Hint:
請確保你能輸出程式執行當天是星期幾。另外,當輸出玩今天星期幾後,結束程式。
Please make sure you can print which day is your program be executed. Besides, terminal your program after answer what day is today.
最后更新于
这有帮助吗?