P4B Quiz (6):數值資料型態介紹與使用

by KC
0 comment

Welcome to your quiz -「 P4B Quiz (6):數值資料型態介紹與使用

Name
Email
1. 
以下執行結果是什麼?

float('2.8')

2. 
以下執行結果是什麼?

int('2.8')

3. 
以下執行結果是什麼?

a = 2 + 3.0
print(type(a))

4. 
以下執行結果是什麼?

float('3')

5. 
以下執行結果是什麼?

c = 2 + 3j
print(type(c))

6. 
以下執行結果不會出現哪一個答案?

import random
print(random.randrange(10, 20))

7. 
以下執行結果是什麼?

int('3')

8. 
以下執行結果是什麼?

int('python3')

9. 
以下執行結果是什麼?

import fractions
print(fractions.Fraction(2, 5))

10. 
以下執行結果是什麼?

from fractions import Fraction as F
print(1/F(2, 5))

error: Content is protected !!