我不知道如何为下面的问题编写代码
Write a Python function, call it
Powerball()
, that will return a legitimate Powerball lottery number. Recall that a Powerball number consists of 5 random numbers from 1 to 69, followed by a random number, known as the Powerball, from 1 to 26. In returning the numbers, the first 5 numbers should be in order, followed by the Powerball. Here is an example:4, 13, 31, 36, 52, 8
. You may use a list to return the numbers, like[4, 13, 31, 36, 52, 8]
.
随机导入为r
此代码按升序返回前5个从1到69的唯一随机数,后跟1到26的随机数。在
相关问题 更多 >
编程相关推荐