P4B Quiz (7):字串資料型態介紹與使用 by KC 2023-03-23 written by KC 2023-03-23 0 comment Welcome to your quiz -「 P4B Quiz (7):字串資料型態介紹與使用」 Name Email 1. 以下執行結果是什麼? Name = "Simple Learn"print(Name[1]) S i r n 2. 以下執行結果是什麼? Name = "Simple Learn"print(Name[-2]) S i r n 3. 以下執行結果是什麼? Name = "Simple Learn"print(Name[1:5]) 4. 以下執行結果是什麼? Name = "Simple Learn"print(Name[1:9:2]) 5. 下面輸出結果是什麼? print("AB\nC\nDE") ABC DE AB CD E AB\nC\nDE AB C DE 6. 以下執行結果是什麼? "Hello SimpleLearn".find("Simple") 5 6 7 8 Hint 7. 以下執行結果是什麼? print('print("Hello SimpleLearn")') Hello SimpleLearn "Hello SimpleLearn" print("Hello SimpleLearn") 'print("Hello SimpleLearn")' 8. 以下執行結果是什麼? print("Hello" + " " + "SimpleLearn") HelloSimpleLearn "Hello" + " " + "SimpleLearn" Hello SimpleLearn "Hello" "SimpleLearn" 9. 以下執行結果是什麼? x = "Simple Learn"print("M" in x) True False 10. 以下執行結果是什麼? x = 369print(str(x)) "369" 369 str int Time is Up! Time's up Share 0 FacebookTwitterPinterestEmail previous post P4B Quiz (6):數值資料型態介紹與使用 next post P4B Quiz (5):各類運算子詳細介紹與使用