+ 4

How to generate X, Y, coordinates and Z(height) randomly and arrange in colums.

Considering that am new to python, I am unable to generate X, y, z components of the earth randomly. For example X Y z 22 78 23 90 52 16 53. 12 50 I request for help, to get such sample . https://code.sololearn.com/cyL2OiGPlogp/?ref=app https://code.sololearn.com/cyL2OiGPlogp/?ref=app https://code.sololearn.com/cyL2OiGPlogp/?ref=app

19th May 2020, 8:09 PM
Alfred Amboka
Alfred Amboka - avatar
10 odpowiedzi
20th May 2020, 3:28 AM
Learn11
+ 3
Am having challenges with code playground most on indentation That's one of the reasons the code doesn't run. How can I improve the code then?
19th May 2020, 8:18 PM
Alfred Amboka
Alfred Amboka - avatar
+ 3
Try the following: import random random.seed(1) for X_coordinate in range(10): X_coordinate = random.randrange(-26787,-26690) print(X_coordinate)
19th May 2020, 8:25 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
The challenge am having is to output 3 different columns for x, y, and z
19th May 2020, 8:26 PM
Alfred Amboka
Alfred Amboka - avatar
+ 3
One part, remaining. How to generate different values for x, y, z and combine them as a single table with 3 columns.
19th May 2020, 8:46 PM
Alfred Amboka
Alfred Amboka - avatar
+ 1
I actually don't know it looks like you dud it right but when i ran it says seed isn't defined
19th May 2020, 8:15 PM
Delron Thomas
Delron Thomas - avatar
0
I would probably just get ride of the seed part and just print it out
19th May 2020, 8:20 PM
Delron Thomas
Delron Thomas - avatar
0
I think you may have to just define random
19th May 2020, 8:22 PM
Delron Thomas
Delron Thomas - avatar
0
I know its a module but the console says ut need to be defined
19th May 2020, 8:22 PM
Delron Thomas
Delron Thomas - avatar
0
Dang hes right why didn't i think of that
19th May 2020, 8:26 PM
Delron Thomas
Delron Thomas - avatar