Home > other >  Python code
Python code

Time:11-12

Is there anyone who write the source code, new handwritten don't come out of your own, always run not success

CodePudding user response:

 
Li=list (map (int, input (" input Numbers, separated by Spaces: "). The split ()))
N=li. Pop (0) # number
List1=li # list
If len (list1)==n:
Zonghe=0 # list of all the elements together and
For I in list1:
Zonghe +=I
Pingjunshu=zonghe/n # list of average
Jieguo=0
For I in list1:
If I & gt; Pingjunshu:
Jieguo +=1
Print (jieguo) # output the number of eligible
The else:
There is something wrong with the print (" input the number of ")

Homework should write by yourself

CodePudding user response:

As I wrote very not primarily just learning, a lot of function is different

CodePudding user response:

My homework not sent up picture, I was hoping to make a list, and then sorted, and then loop as long as a number larger than average, behind is greater than average, with n minus number, which directly result I can't write it out

CodePudding user response:

 the from functools import partial 

Fun=partial (input, '& gt;> ')
X=[]
For I in iter (fun, ' ') :
X.a ppend (int (I))
If len (x [1]). [0]=x or not x [0] & gt;=0:
Print (' illegal input! ')
The else:
Print (len ([I for I in [1] if I & gt; x=(sum (x [1])/(len (x) - 1)))))

CodePudding user response:

Ha, ha, ha, the above program, all did not write a python, lost the soul of python

First understand the python relative to other languages, particularly where, and then to use python thought to write
  • Related