当前位置:网站首页>Define a list, store n integers, and calculate the length, maximum value, minimum value and average value of the list
Define a list, store n integers, and calculate the length, maximum value, minimum value and average value of the list
2022-07-03 12:38:00 【iWillook】
#
# main.py
# List Handling
#
# Created by Mewlan Musajan on 4/29/21.
#
def listHandling(g):
listLength = 0
all = 0
maximum = max(g)
minimum = min(g)
for b in g:
listLength += 1
all += b
average = all / listLength
print(str(" The length of the list {0}, Maximum {1}, minimum value {2}, Average {3}").format(listLength, maximum, minimum, average))
list = [1, 2, 3, 4, 5, 6, 7, 8]
listHandling(list)
边栏推荐
- Everything comes to him who waits
- Solve the problem of VI opening files with ^m at the end
- Prompt unread messages and quantity before opening chat group
- Public and private account sending prompt information (user microservice -- message microservice)
- Is it safe to open an account for online stock speculation? Who can answer
- Eureka自我保护
- [ManageEngine] the role of IP address scanning
- If you can't learn, you have to learn. Jetpack compose writes an im app (II)
- 最新版盲盒商城thinkphp+uniapp
- Unicode查询的官方网站
猜你喜欢

Wechat applet pages always report errors when sending values to the background. It turned out to be this pit!
![Sword finger offer03 Repeated numbers in the array [simple]](/img/cf/c1ad2f2a45560b674b5b8c11fed244.png)
Sword finger offer03 Repeated numbers in the array [simple]

Integer int compare size

Sword finger offer05 Replace spaces

Eureka self protection

Swagger

Record your vulnhub breakthrough record

社交社区论坛APP超高颜值UI界面

【ManageEngine】IP地址扫描的作用

Sword finger offer09 Implementing queues with two stacks
随机推荐
Slf4j log facade
elastic_ L04_ introduction. md
Atomic atomic operation
剑指Offer03. 数组中重复的数字【简单】
Sword finger offer09 Implementing queues with two stacks
2.6 preliminary cognition of synergetic couroutines
Is it OK to open an account for online stock speculation? Is the fund safe?
error: expected reference but got (raw string)
Comprehensive evaluation of double chain notes · Siyuan notes: advantages, disadvantages and evaluation
The solution to change the USB flash disk into a space of only 2m
init. RC service failed to start
网上炒股开户安不安全?谁给回答一下
Do you feel like you've learned something and forgotten it?
Integer string int mutual conversion
云计算未来 — 云原生
Sword finger offer10- I. Fibonacci sequence
剑指Offer07. 重建二叉树
Eureka自我保护
01_ Using the concurrent tool class library, is thread safety safe
Sqoop1.4.4原生增量导入特性探秘