|
|
вернуться в форумPlease, tell me, why it is wrong? (Python 3.4) Послано Teiwaz 5 мар 2015 05:47 a = input() from math import sqrt for q in a.split()[::-1]: print("%.4F" % sqrt(float(q))) Re: Please, tell me, why it is wrong? (Python 3.4) input() would only take one line as input. Re: Please, tell me, why it is wrong? (Python 3.4) Послано Tavy 26 июл 2016 16:48 Try using sys.stdin.read() . For testing, copy the input from example, paste it, press enter and CTRL+D import sys, math _in = sys.stdin.read() for nr in _in.split()[::-1]: print ("%.4f" % math.sqrt(float(nr))) Re: Please, tell me, why it is wrong? (Python 3.4) in(input()) Re: Please, tell me, why it is wrong? (Python 3.4) Послано Borius 22 янв 2017 13:08 Thanks it worked. Really not obvious thing here. |
|
|