P4B Quiz (6):數值資料型態介紹與使用 by KC 2023-03-22 written by KC 2023-03-22 0 comment Welcome to your quiz -「 P4B Quiz (6):數值資料型態介紹與使用」 Name Email 1. 以下執行結果是什麼? float('2.8') 2 3 2.8 ValueError 2. 以下執行結果是什麼? int('2.8') 2 3 2.8 ValueError 3. 以下執行結果是什麼? a = 2 + 3.0print(type(a)) <class 'int'> <class 'float'> <class 'complex'> SyntaxError 4. 以下執行結果是什麼? float('3') 3 3.0 SyntaxError ValueError 5. 以下執行結果是什麼? c = 2 + 3jprint(type(c)) <class 'int'> <class 'float'> <class 'complex'> SyntaxError 6. 以下執行結果不會出現哪一個答案? import randomprint(random.randrange(10, 20)) 10 15 17 20 7. 以下執行結果是什麼? int('3') '3' '3.0' 3 3.0 8. 以下執行結果是什麼? int('python3') '3' 3 'python3' python3 ValueError 9. 以下執行結果是什麼? import fractionsprint(fractions.Fraction(2, 5)) 0.4 2.5 2/5 5/2 10. 以下執行結果是什麼? from fractions import Fraction as Fprint(1/F(2, 5)) 0.4 2.5 2/5 5/2 Time is Up! Time's up Share 0 FacebookTwitterPinterestEmail next post P4B Quiz (7):字串資料型態介紹與使用