Random number generators?

2012-11-17 2:04 am
1. Use random integer on your calculator to simulate rolling a die 10 times.
2. Use random integer on your calculator to simulate tossing a coin 10 times.
3. Use random integer on your calculator to simulate being a 90% shooter in soccer (for direct kicks) and having 2 direct kicks.
4. Use random integer on your calculator to simulate a 54% chance of having the best fare among different airlines for 3 flights.

I understand how to use the calculator to solve the first two questions, randint(1,6,10) and randint(1,2,10), but the last two problems elude me. Could someone explain this to me please?

回答 (2)

2012-11-17 3:12 am
✔ 最佳答案
For 3 you could do randint(1,10,2) and if it's 1-9 he or she scores and if it is 10 then he or she misses.

For 4 you could have it pick a number between 1 and 100 and I am not sure how to interpret the part about the three flights but if the number is from 1 to 54 then you got the cheapest flight and otherwise you didn't.
2012-11-17 12:20 pm
I would pick 4.


收錄日期: 2021-05-01 14:23:22
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20121116180437AAQTtCO

檢視 Wayback Machine 備份