endl="...

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 561
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

endl="...

Message par compsystems » mar. nov. 05, 2019 2:36 am

Hi BP. in python syntax and previous versions of Xcas the variable endl = "\t" or endl = "\n" was interpreted correctly

Code : Tout sélectionner

def fib(n):  # write Fibonacci series up to n Print a Fibonacci series up to n 
        a, b = 0, 1
        while a < n:
            print(a, endl="\t"  )
            a, b = b, a+b
        return Done
fib(8) [enter] before
0 1 1 2 3 5 8


Now
0,equal(endl," ")
1,equal(endl," ")
1,equal(endl," ")
2,equal(endl," ")
3,equal(endl," ")
5,equal(endl," ")
8,equal(endl," ")

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: endl="...

Message par parisse » mar. nov. 05, 2019 6:06 pm

Indeed. Will fix for next release.

Répondre