Ask Your Question
0

Create a new list

asked 2013-12-19 07:52:39 -0600

anonymous user

Anonymous

updated 2015-01-14 07:08:27 -0600

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 08:39:09 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2013-12-19 08:39:18 -0600

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 07:52:39 -0600

Seen: 1,739 times

Last updated: Dec 19 '13