随机数和函数 [英] Random numbers and functions
本文介绍了随机数和函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我是python的新手,因此我只玩基本的编码/脚本。我今天花了很多时间使用随机数字。感谢您的所有意见和建议,这真的帮助我学习。我有一个新问题,我现在正在思考,我知道如何继续但是想提出这个问题以获得一些建议。
这是我正在尝试的到目前为止我已经想到了什么。
- 然后我希望脚本生成具有左上角和右下角边界的随机数。向量/坐标
- 因此,基本上没有随机生成的十进制数可以超出左上角和右下角的范围。坐标。
- 到目前为止,通过游戏我已经编写了以下代码,这要归功于在此论坛上从其他人的帮助中获得的知识。
- I then want the script to generate random numbers that are with the bounds of the "upper left and lower right" vectors/coordinates
- So, basically none of the randomly generated decimal numbers can go out of the bounds of the "upper left and lower right" coordinates.
- So far by playing around I have coded the following thanks to the knowledge gained from the help of others on this forum.
- 然后我希望脚本生成具有左上角和右下角边界的随机数。向量/坐标
- 因此,基本上没有随机生成的十进制数可以超出左上角和右下角的范围。坐标。
- 到目前为止,通过游戏我已经编写了以下代码,这要归功于在此论坛上从其他人的帮助中获得的知识。
Hi everyone, I''m fairly new with python and as such am playing around alot with just basic coding/scripting. I''ve spent the better part of today working with random numbers. Thanks for all your comments and advice it''s really helped me to learn. I have a new question that I an thinking about right now, I have an idea of how to proceed but wanted to pose this question to get some advice.
Here is what I am trying to do and what I have figured out so far.
展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号
推荐答案
大家好,我对python很新,所以我正在玩很多基本的编码/脚本。我今天花了很多时间使用随机数字。感谢您的所有意见和建议,这真的帮助我学习。我有一个新问题,我现在正在思考,我知道如何继续但是想提出这个问题以获得一些建议。
这是我正在尝试的到目前为止我已经想到了什么。
展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号
不要忘记''f.close''之后的''()''!怎么样:
Do not forget the ''()'' after ''f.close''! How about this:
展开 | 选择 | Wrap | 行号
不要忘记''()''之后'' f.close ''!怎么样:
Do not forget the ''()'' after ''f.close''! How about this:
展开 | 选择 | Wrap | 行号
这篇关于随机数和函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文