> On Jan 19, 2019, at 17:23 , Anton Sherwood <bro...@pobox.com> wrote:
> 
> On 2019-1-19 15:52, MAMANE DJAMILOU Salissou Dango wrote:
>> Bonjour,
>> je suis un tous nouveau utilisateur de sagemath. Je maîtrise les opérations 
>> indépendantes. Mon souci se trouve au nivaux des algorithmes. je n'arrive, 
>> jusque là pas à comprendre comment programmer avec sageMath (voir les 
>> ''screenshots'').
>> merci de m'aider à démarrer.
> 
> An attempt at translation:
> Good day,
> I am a very new user of sagemath.  I am mastering independent operations.  My 
> trouble is on the level of algorithms.
> So far, I cannot understand how to program with sageMath (see the 
> screenshots).
> Thanks for helping me to get started.

The problem is the use of “\”.  Python programs are structured by indentation, 
so the way to type the program in an editor, at the command line prompt, or in 
the notebook, is as follows:

def fac(n):
    if n == 1:
        print ‘bonjour’
    else:
        print “bonsai”

The OP was entering the code almost correctly, but the “\” caused the parser to 
ignore the new-line, and string everything together as one line.  

HTH

Justin

--
Justin C. Walker
Director
Institute for the Enhancement of the Director's Income
--
Fame is fleeting, but obscurity
   just drags on and on.      F&E



-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to