Creating a list with 2 variables from 2 diffrent sets [closed]

asked 2016-08-03 15:34:23 +0200

Soul gravatar image

I need to create a set of numbers which are defined by m in [0..41] and n in [100]. The new created set needs to contain all the numbers which fulfill that condition.

I tried to accomplish that with:

A=[n^2+n+m^2 for n in [1..100] and m in [0..41]]

But Sage takes the and as an bool value not as another condition. can you help me with that?

(First time programming and english is not my mother tongue. Please be pleasefull)

Thanks alot!

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by vdelecroix
close date 2016-08-03 16:07:49.803391

Comments

duplicate of this question

vdelecroix gravatar imagevdelecroix ( 2016-08-03 16:08:05 +0200 )edit