Ask Your Question
1

n*1/n^2 for n = 1,2,3,50.

asked 2023-09-09 22:34:01 +0100

Learner2023 gravatar image

new to sage math trying to practice and need some help generating a list for 1/n^2 where n = 1,2,3,...50 any help is appreciated

edit retag flag offensive close merge delete

Comments

List comprehension:

[1/n^2 for n in [1..50]]
dan_fulea gravatar imagedan_fulea ( 2023-10-06 19:32:12 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-09-10 09:37:39 +0100

tolga gravatar image

updated 2023-09-10 09:51:07 +0100

Please check this:

v=[1/n^2 for n in range(1,51)]
print(v)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-09-09 22:34:01 +0100

Seen: 232 times

Last updated: Sep 10 '23