Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new question in list medium difficulty #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions Extra_questions/.ipynb_checkpoints/04_Lists-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,34 @@
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- Write a program to find the least positive integer missing from a list of input integers.\n",
"\n",
" **Example :** \n",
"\n",
"```Python\n",
"\n",
"def least_positive_integer(input_list):\n",
" # your code here\n",
"\n",
"\n",
"\n",
"List_1 = [1,-2,3,0,7,8,5,2,-6]\n",
"\n",
"least_positive_integer(List_1)\n",
">>> 4\n",
" \n",
"List_2 = [3,7,-1,8,9,10]\n",
"\n",
"least_positive_integer(List_2)\n",
">>> 1\n",
" \n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -231,7 +259,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -245,7 +273,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.8.10"
}
},
"nbformat": 4,
Expand Down
32 changes: 30 additions & 2 deletions Extra_questions/04_Lists.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,34 @@
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- Write a program to find the least positive integer missing from a list of input integers.\n",
"\n",
" **Example :** \n",
"\n",
"```Python\n",
"\n",
"def least_positive_integer(input_list):\n",
" # your code here\n",
"\n",
"\n",
"\n",
"List_1 = [1,-2,3,0,7,8,5,2,-6]\n",
"\n",
"least_positive_integer(List_1)\n",
">>> 4\n",
" \n",
"List_2 = [3,7,-1,8,9,10]\n",
"\n",
"least_positive_integer(List_2)\n",
">>> 1\n",
" \n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -231,7 +259,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -245,7 +273,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.8.10"
}
},
"nbformat": 4,
Expand Down