[英]Write a program that asks the user for a string and then prints the string in upper case
我正在自學編程語言(CEMC Python 從頭開始),這是我的第一門編程語言。 我花了三個多小時來解決這個問題。 請幫助解決這個問題,這樣我就可以知道我做錯了什么。
# python 2.x
>>>text = raw_input()
# python 3.x
>>>text = input()
>>>print(text.upper())
# script.py
string = input("write a string ")
print(string.upper())
我在 python 上對其進行了測試,它可以工作:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.