Ask Your Question
0

Create a new list

asked 2013-12-19 14:52:39 +0100

anonymous user

Anonymous

updated 2015-01-14 14:08:27 +0100

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!

edit retag flag offensive close merge delete

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 ( 2013-12-19 15:39:09 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-12-19 15:39:18 +0100

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
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

Stats

Asked: 2013-12-19 14:52:39 +0100

Seen: 2,024 times

Last updated: Dec 19 '13