当前位置:网站首页>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)
边栏推荐
- 剑指Offer04. 二维数组中的查找【中等】
- Cloud Computing future - native Cloud
- Sqoop1.4.4原生增量导入特性探秘
- 云计算未来 — 云原生
- Summary of error prone knowledge points: Calculation of define s (x) 3*x*x+1.
- 剑指Offer03. 数组中重复的数字【简单】
- Flutter: self study system
- Tensorflow binary installation & Failure
- Everything comes to him who waits
- Bert running error: attributeerror: module'tensorflow contrib. tpu' has no attribute 'InputPipelineConfig'
猜你喜欢
![[ManageEngine] the role of IP address scanning](/img/dc/df353da0e93e4d936c39a39493b508.png)
[ManageEngine] the role of IP address scanning

Flutter 退出登录二次确认怎么做才更优雅?

Develop plug-ins for idea

Integer int compare size

最新版盲盒商城thinkphp+uniapp

Summary of error prone knowledge points: Calculation of define s (x) 3*x*x+1.

The future of cloud computing cloud native

雲計算未來 — 雲原生

Prompt unread messages and quantity before opening chat group

The latest version of blind box mall thinkphp+uniapp
随机推荐
剑指Offer05. 替换空格
2020-09_ Shell Programming Notes
[combinatorics] permutation and combination (summary of permutation and combination content | selection problem | set permutation | set combination)
Wechat applet - basic content
Adult adult adult
Lambda expression
Slf4j log facade
initial、inherit、unset、revert和all的区别
Keep learning swift
剑指Offer07. 重建二叉树
Flinksql can directly create tables and read MySQL or Kafka data on the client side, but how can it automatically flow and calculate?
雲計算未來 — 雲原生
Bert running error: attributeerror: module'tensorflow contrib. tpu' has no attribute 'InputPipelineConfig'
Oh my Zsh + TMUX installation
CNN MNIST handwriting recognition
Take you to the installation and simple use tutorial of the deveco studio compiler of harmonyos to create and run Hello world?
Introduction to concurrent programming (I)
temp
Integer string int mutual conversion
使用BLoC 构建 Flutter的页面实例