Home > other >  River's lake emergency!!!!!! Save the children!
River's lake emergency!!!!!! Save the children!

Time:10-11

Python, please, help children

CodePudding user response:

Def PI (e) :
Y=0
X2=1
X=1
While the x2 & gt; E:
Y=y + x2
X=x + 2
* (x2=x2 (x - 1)/2)/x
Return (y * 2)

CodePudding user response:

reference 1st floor zxc_wolf response:
def PI (e) :
Y=0
X2=1
X=1
While the x2 & gt; E:
Y=y + x2
X=x + 2
* (x2=x2 (x - 1)/2)/x
Return (y * 2)

Thank you bosses!!!!!!

CodePudding user response:

Is there any big meowed

CodePudding user response:

A=,2,3,4,3,56,67 [1]

Def px (a) :
Le=len length # 8 (a)
For I in range (le) :
For j in range (le - I - 1) :
If a [m + 1] & gt; A [j] :
A [j], a [j + 1)=a [j + 1], a [j]
Return a

P (a)

CodePudding user response:

A=,2,3,4,3,56,67 [1]

Def px (a) :
Le=len (a)
I=0
J=0
While I & lt; Le:
While j<(le - I - 1) :
If a [m + 1] & gt; A [j] :
A [j], a [j + 1)=a [j + 1], a [j]
J=j + 1
I=I + 1
J=0
Return a

P (a)

CodePudding user response:

Other problems are solved, ask bosses hexadecimal conversion that how to do

CodePudding user response:

Palindrome: 1, 0 n
The import math
Def p_str (a) :
Le=len (a)
M=math ceil (le/2)
Res=1
For I in range (m) :
If a [I]!=a [- (I + 1)] :
Res=0
Break
return res

CodePudding user response:

Def getss (a, b) :
Num=[]
For I in range (a, b) :
J=2
For j in range (2, I) :
If (I % j==0) :
Break
The else:
Num. Append (I)
Return num

CodePudding user response:

度啦啦啦啦

CodePudding user response:

Def e2hex (a) :
A=STR (a)
Le=len (a)
Num=0
For I in range (le) :
Num=num + int (a [I]) 8 * * * le - I - 1)
The base=[STR (x) for x in the range (10)] + [' A ', 'B', 'C', 'D', 'E', 'F']
Ls=[]
While True:
Num, rem=divmod (num, 16)
Ls. Append (base (rem))
If num==0:
Return '. Join (ls] [: : - 1)
  • Related