0

def

def F(x) n=F(input()) def F(x=input()) n=F Borh options should do the same no?

13th Dec 2018, 1:54 PM
albr3cht
albr3cht - avatar
11 Réponses
+ 7
Factors are always primes.
13th Dec 2018, 10:06 PM
John Wells
John Wells - avatar
+ 3
I'd put the results into a variable prior to the return and return that variable.
13th Dec 2018, 6:48 PM
John Wells
John Wells - avatar
+ 1
Neither is valid syntax. This works: def F(x): return x n=F(input())
13th Dec 2018, 6:28 PM
John Wells
John Wells - avatar
+ 1
Thanks
13th Dec 2018, 6:33 PM
albr3cht
albr3cht - avatar
+ 1
What should it do?
13th Dec 2018, 9:19 PM
John Wells
John Wells - avatar
+ 1
Ok thanks! that should solve it all
13th Dec 2018, 10:16 PM
albr3cht
albr3cht - avatar
0
Then if I want ' F' to return the result of a serie of operations or loops should I write all of them after the return?
13th Dec 2018, 6:46 PM
albr3cht
albr3cht - avatar
0
And can you help me the with this code? https://code.sololearn.com/c3ghpSa1FW83/?ref=app
13th Dec 2018, 7:31 PM
albr3cht
albr3cht - avatar
0
It should factorize numbers till approximately 900
13th Dec 2018, 9:23 PM
albr3cht
albr3cht - avatar
0
13th Dec 2018, 9:43 PM
John Wells
John Wells - avatar
0
Is adding one instead of the list gona make the factorization be always with prime numbers?
13th Dec 2018, 9:52 PM
albr3cht
albr3cht - avatar