Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Project: Shared Project -- Fall 2021 MAT1630
Views: 23Image: ubuntu2004
Kernel: Python 3 (system-wide)
Use a list comprehension to create a list containing all odd numbers from 1 to 50.
For this assignment we will use a list of comprehension and use module to find if the numbers have remainder of 1. This way, we will find a list of odd numbers from 1 to 50.
In [1]:
Out[1]:
[1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49]
In [0]: