Ask Your Question
0

Create a new list

asked 11 years ago

anonymous user

Anonymous

updated 10 years ago

FrédéricC gravatar image

Hi! I have a work to do on Sage and I want to know how can I create a new list where I can put 50k values, so then I can show it after on a graphic. Also I have another question, how can i generate randomly a number between one and three? Thank you!

Preview: (hide)

Comments

I think that we need a little more specifics on your first question - can you give us a toy example? Creating a list is normally as easy as `L = [1,2,3]`.

kcrisman gravatar imagekcrisman ( 11 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 11 years ago

kcrisman gravatar image

Second question: Depending on what you want, one of these should work.

sage: random()*2+1
2.6986168566690996
sage: randint(1,3)
1
Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 11 years ago

Seen: 2,072 times

Last updated: Dec 19 '13