- 1

How to write using python?

ls = [1,2,3] output should be ls = [1,2,3,9,4,1]

28th Sep 2021, 10:47 AM
Navneet
Navneet - avatar
6 Respostas
+ 2
Lets see a try. Think about the relation between the first 3 and last 3 numbers no way Aleksei Radchenkov ! they gotta be squares of the first 3 numbers in reverse order! Or mabey i am thinking too deep haha
28th Sep 2021, 10:49 AM
Slick
Slick - avatar
+ 2
Slick , mate you are thinking too deep 🤣 It's just nonsence...
28th Sep 2021, 10:56 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 2
Navneet ls = [1,2,3] You know you must square the numbers in a reversed format and append to the list. That sounds like a psuedo code create a loop in reverse format. square each item of the loop append to the list
28th Sep 2021, 11:13 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
you are right slick they just squared the no. and reversed it
28th Sep 2021, 10:57 AM
Navneet
Navneet - avatar
+ 1
I didn't even see the attempt of an attempt. Please post the code showing what you've done to work on this. I gave the answer
28th Sep 2021, 11:01 AM
Slick
Slick - avatar
0
Please provide the solution
28th Sep 2021, 10:59 AM
Navneet
Navneet - avatar