Home > other >  When to enter multiple arguments to input the how to write like this program
When to enter multiple arguments to input the how to write like this program

Time:10-09

I want to enter averaging more Numbers and so on to define a function but this argument is also more than the input number how to say with a

CodePudding user response:

For big thank you

CodePudding user response:

 
Para def demo (*) :
Avg=sum (para)/len (para)
G=[I for I para in the if I & gt; avg]
Return (para) + (avg,) + the tuple (g)

A=(1, 2, 3, 4) # list can also

Print (demo) (* a) # remember add *

Is to reach this effect?

CodePudding user response:

The
reference 2 floor Vv. Stone3 response:
 
Para def demo (*) :
Avg=sum (para)/len (para)
G=[I for I para in the if I & gt; avg]
Return (para) + (avg,) + the tuple (g)

A=(1, 2, 3, 4) # list can also

Print (demo) (* a) # remember add *

Is to reach this effect?
for but how to let a user input

CodePudding user response:

If the data is not much, so do


If more than, in an infinite loop is added to the list, if the input is "q", exit the infinite loop,

CodePudding user response:

The
yellow elder brother Python training reference 4 floor response:
if the data is not much, do


If more than, in an infinite loop is added to the list, if the input is "q", exit the infinite loop,
ok thank you
  • Related