from random import randrange
def distribution (n: int):
for dice in [randrange(1,7) + randrange(1,7) for _ in range(n)]:
num_of_appearances = result.count(dice)
percentage = (num_of_appearances / n) * 100
bar = int(percentage) * '*'
print("{0:2}:{1:8} ({2:4.1f}%) {3}".format(dice, num_of_appearances, percentage, bar))
答案 0 :(得分:2)
您需要在AndroidManifest.xml中为主Activity设置LAUNCHER类别。例如:
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>