|
|
back to boardPlease, tell me, why it is wrong? (Python 3.4) Posted by Teiwaz 5 Mar 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) Posted by Tavy 26 Jul 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) Posted by Borius 22 Jan 2017 13:08 Thanks it worked. Really not obvious thing here. |
|
|