Ask Your Question
0

putting a sage program inside a loop with out modifying the indentation

asked 2015-09-20 01:39:54 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I have written a simple program on sage, in which I will define a graph G at the beginning , and the program will return a matrix. now I want the program to return all such matrices corresponds to all trees of order 5. So basically I want to iterate the program over the list of all trees of order 5. But when I doing so, I need to change the indentation of each and every line of the program as I am putting all of them inside a loop. is there any way of getting rid of this problem, my program has more than 50 lines so it looks difficult to change the indentation . one thing I thought was using goto command, but I dont know how to use it.

Any suggestion would be appreciated.

Thanks a lot.

edit retag flag offensive close merge delete

Comments

get an editor that makes it easy to increase the indentation of the whole block. The sage notebook itself does that.

nbruin gravatar imagenbruin ( 2015-09-20 02:06:11 -0600 )edit

can you please tell me how to increase the whole indentation in sage notebook? thanks

GA316 gravatar imageGA316 ( 2015-09-20 02:12:17 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-09-20 09:28:01 -0600

tmonteil gravatar image

On the Sage notebook, just select the paragraph you want to indent and click on the <tab> key.

edit flag offensive delete link more

Comments

thanks. it works perfectly. nice.

GA316 gravatar imageGA316 ( 2015-09-21 01:27:46 -0600 )edit

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: 2015-09-20 01:39:54 -0600

Seen: 54 times

Last updated: Sep 20 '15