Python 46
[Python 100] Python 100
50
#!/usr/bin/python
# -*- coding: UTF-8 -*-
TRUE = 1
FALSE = 0
def SQ(x):
return x * x
print (' 50')
again = 1
while again:
num = int(input(''))
print (': %d' % (SQ(num)))
if SQ(num) >= 50:
again = TRUE
else:
again = FALSE
50 12 : 144 14 : 196 1 : 1
[Python 100] Python 100
a12***[email protected]
#!/usr/bin/python # -*- coding: UTF-8 -*- while(1): n=input('') print ': %d' % (n**2) if n**2 < 50: quit() else: print ''a12***[email protected]
wei***[email protected]
#! /usr/local/bin # -*- coding:UTF-8 -*- # 50 def py_pow( number ): if pow(number,2)<50: print '%2d' % pow(number,2),'50' exit(); else: print '%2d' % pow(number,2),'50\n' number = int(raw_input('\n')) py_pow(number) py_number = int(raw_input('\n')) py_pow(py_number)wei***[email protected]
252***[email protected]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def power(x): if x ** 2 >= 50: print('{}:{},50'.format(x, x ** 2)) else: print('{}:{},50'.format(x, x ** 2)) quit() while True: x = int(input(':')) power(x)252***[email protected]
yorun
547***[email protected]
#!/usr/bin/python3 while True: x = int(input('input a num :')) x *= x print('{}'.format(x)) if x > 50: breakyorun
547***[email protected]
iMax4ever
jia***@foxmail.com
Python3
while True: a = int(input('Enter a number which squr is lager than 50:')) if a * a < 50: print('{}^2 = {}\nit does not meet the demand'.format(a, a * a)) break else: print('{}^2 = {}'.format(a, a * a))iMax4ever
jia***@foxmail.com
475***[email protected]
python3lambda
# 50 s = 100 while s > 50: number = int(input('please enter a number')) f = lambda x: x*x print(f(number))475***[email protected]