-->
当前位置:首页 > 题库 > 正文内容

编程题:Random addition for primary school students

Luz2个月前 (12-05)题库90
Use the random function of the random module to randomly generate some addition questions (both addends are required to be positive integers less than 10). The random number seed a and the number of questions n are entered by the user. (Note: first use the seed function of the random module to initialize the random number seed)

### Input Specification:

Enter random number seed a and number of questions n in one line.

### Output Specification:

Output n addition problems in the form of x+y=, one problem per line.

### Sample Input #1 :

in
2 5


### Sample Output #1:
out
1+2=
2+6=
3+5=
5+4=
1+3=

### Sample Input #2:

in
333 3


### Sample Output #2:
out
9+6=
6+4=
7+2=










答案:若无答案欢迎评论

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。