皮皮学,免费搜题
登录
搜题
【简答题】
随机数的生成和数组元素的乱序(洗牌) rand函数 rand EXPR 返回一个大于等于0,小于表达式EXPR返回值的一个浮点数。EXPR省略,则值为1。 int EXPR 返回EXPR表达式返回值的整数部分(取整) int(rand 10) #随机生成小于10的整数。 随机从一个数组里剪出元素,按顺序放入另一个数组。获得起始数组的乱序数组。 push pop shift unshift都是从数组的一侧进行操作。只有splice可以在数组内部进行操作。 @number =(0..9); $number_5 = splice @number,5,1;# 从index 5开始,切出1个来。@number剩下9个。 $number_rand1 = splice @number,int(rand 9),1;# 从index(随机数(0-8))开始,切出1个。 $number_rand2 = splice @number,int(rand 8),1;# 从index(随机数(0-7))开始,切出1个。 ----------------------------- 生成一副扑克牌,存入@cards,然后洗牌后存入@rand_cards。
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【简答题】Listen again and fill in the blanks. Alan: Hi, everyone. Guess what? I just bought a new PDA. It’s very cool. I was told that it’s the most 1._______ model on the market now. It has 2.________. What d...
【简答题】短文改错。 英语课上,老师要求同桌同学相互修改作文。假设以下小作文为你同桌所写,请你对其进行修改。 文有10处错误,每句中最多有两处。错误涉及一个单词的增加、删除或修改。 增加:在缺词处加一个漏词符号(^),并在此符号下面写出该加的词。 删除:把多余的词用斜线(/)划掉。 修改:在错的词下划一横线,并在该词下面写出修改后的词。 注意:1. 每处错误及其修改均仅限一词。 2. 只允许修改10处,...
【简答题】英语课上,老师要求同桌同学相互修改作文。假设以下小作文为你同桌所写,请你对其进行修改。文有10处错误,每句中最多有两处。错误涉及一个单词的增加、删除或修改。 增加:在缺词处加一个漏词符号(^),并在此符号下面写出该加的词。 删除:把多余的词用斜线(/)划掉。 修改:在错的词下划一横线,并在该词下面写出修改后的词。 注意:1.每处错误及其修改均仅限一词。 2.只允许修改10处,多者(从第11处起...
【判断题】所有的病毒仅由核酸和蛋白质两种物质组成
A.
正确
B.
错误
【判断题】所有病毒仅由核酸与蛋白质两种物质组成。
A.
正确
B.
错误
【简答题】Task 4 Listen to the monologue again and fill in the blanks. 1. I took _______ with the TV broadcaster. 2. I _______ the toilet of MacDonald's. 3. When I ________ from the washroom, I was in a suit, ...
【简答题】作文。 假设你就是图中的小男孩,写一写你的故事。(词数30—50) 1. 2. 3. 4.
【简答题】Listen to the short passage carefully, and then fill in the blanks with what you have heard. Last week I went to the (1) . I had a very good (2) . The play was very (3) . I did not (4) it. A young man...
【简答题】Listen to the dialogue and fill in the blanks. Teacher: Oh, hi. What was your name again. I can't______all the students' names this being the second day of school. Student: It's okay. I have a hard ti...
【简答题】Listen again and fill in the blanks. Alan: Hi, everyone. Guess what? I just bought a new PDA. It’s very cool. I was told that it’s the most 1._______ model on the market now. It has 2.________. What d...
相关题目: