问题 单项选择题

要产生30~50之间的随机整数,下列表达式正确的是()。

A.int(rnd*20+30)

B.int(rnd*21+30)

C.int(rnd*31+20)

D.int(rnd*50)

答案

参考答案:A

单项选择题
单项选择题