ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 03 May 2021 06:38:18 +0200How to find difference table of DES S box in sage math?https://ask.sagemath.org/question/56914/how-to-find-difference-table-of-des-s-box-in-sage-math/ I have tried to find difference table of an Sbox in sage but it supports square Sboxes. Is there a way to find the difference table of an Sboxes like DES.
Below is the code and the output when I tried to enter two rows of Sbox.
sage: S = SBox(14,4,13,1,2,15,11,8,3,10,6,12,5,9,0,7,0,15,7,4,14,2,13,1,10,6,12,11,9,5,3,8)
sage: S.difference_distribution_table()
The out put is
32 x 16 dense matrix over Integer Ring (use the '.str()' method to see the entries)
I donot know what is .str() method.
Thanks in advancesadiMon, 03 May 2021 06:38:18 +0200https://ask.sagemath.org/question/56914/What is the exact difference between Sage and Cocalc?https://ask.sagemath.org/question/43409/what-is-the-exact-difference-between-sage-and-cocalc/Could anyone tell me, what is the difference between Sage and Cocalc?
Any answers would be accepted.
Thank you!pizzaSat, 18 Aug 2018 08:26:01 +0200https://ask.sagemath.org/question/43409/Syntax differences with pythonhttps://ask.sagemath.org/question/38777/syntax-differences-with-python/Hello,
I'm trying to do a tricky function that requires a unknown number or regular argument, some default keywords argument and any number of other keyword argument.
In python, this code works:
def addplot_coordinates(*args, plus_option=False, **kwargs):
pass
But it doesn't work with sage:
sage: def addplot_coordinates(*args, plus_option=False, **kwargs):
....: pass
File "<ipython-input-1-dace1b5103c9>", line 1
def addplot_coordinates(*args, plus_option=False, **kwargs):
^
SyntaxError: invalid syntax
I naively though that any correct python code would work with sage. I found here* that there is some «minimal syntax difference», and searching «sage python syntax difference» on a search engine does not give relevant results.
Is there a document listing all the things someone coming from python should be careful about ? Can someone give me a pointer to such a document ?
Thank you for your time.
[*] I can't make a link, I meant this page /question/8528/sage-vs-pure-python/ on this forum.ocaSun, 10 Sep 2017 06:51:30 +0200https://ask.sagemath.org/question/38777/How to define finite difference approximation for first order derivativehttps://ask.sagemath.org/question/32333/how-to-define-finite-difference-approximation-for-first-order-derivative/I need to define $$y1(k)=\frac{y_{k+1}-y_{k-1}}{2*h}$$
in sage so that sage can differ between symbolic $$y_{k+1}$$ and $$y_{k}$$.
Would somebody please help?
OrangeMon, 25 Jan 2016 19:09:28 +0100https://ask.sagemath.org/question/32333/Sage vs pure pythonhttps://ask.sagemath.org/question/8528/sage-vs-pure-python/What is the difference (besides the minimal syntax diff.) between using Sage against using pure Python? Why should one choose Sage?pinskyTue, 13 Dec 2011 07:09:11 +0100https://ask.sagemath.org/question/8528/