<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
font-family: "Microsoft YaHei", serif;
}
body, dl, dd, p, h1, h2, h3, h4, h5, h6 {
margin: 0;
}
ol, ul, li {
margin: 0;
padding: 0;
list-style: none;
}
img {
border: none
}
</style>
</head>
<body>
<div id="wrap"></div>
<script>
// 随机数
console.log(Math.random()); // 0到1
console.log(Math.round(4.5)); //四舍五入
console.log(Math.ceil(4.1)); // 想上取整
console.log(Math.floor(4.9)); // 向下取整
console.log(Math.floor(Math.random() * 11)); //取一个0-10的整数
console.log(Math.abs(-111)); //绝对值
console.log(Math.max(1, 2, 23, 4)); //取最大值
console.log(Math.max(1, 2, 23, 4)); //取最小值
console.log(Math.pow(2, 3));// 指数函数
</script>
</body>
</html>
Python3Turtle