# encoding:utf-8 # p001_1234threeNums.py def threeNums(): '''题目:有1.2.3.4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?''' print None count = 0 nums = [] for index1 in xrange(1,5): for index2 in xrange(1,5): for index3 in xrange(1,5): if index1 != index2 and index1 !…
最近在给公司培训Python,布置了一道题: ------------------------------------------------------------------------------------------- Generate 10 random floats(value range is (-2.0,2.0) and precision is 1) and save as list; Such as: [-0.7, 0.8, 1.6, 0.1, 0.3, -1.0, 0.4…