File tree Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "cells" : [
3+ {
4+ "cell_type" : " code" ,
5+ "execution_count" : 2 ,
6+ "metadata" : {},
7+ "outputs" : [
8+ {
9+ "name" : " stdin" ,
10+ "output_type" : " stream" ,
11+ "text" : [
12+ " Enter N 4\n " ,
13+ " 3\n " ,
14+ " 2\n " ,
15+ " 4\n " ,
16+ " 2\n " ,
17+ " Enter Key 2\n "
18+ ]
19+ },
20+ {
21+ "name" : " stdout" ,
22+ "output_type" : " stream" ,
23+ "text" : [
24+ " Found\n "
25+ ]
26+ }
27+ ],
28+ "source" : [
29+ " def search(arr, x): \n " ,
30+ " \n " ,
31+ " for i in range(len(arr)): \n " ,
32+ " \n " ,
33+ " if arr[i] == x: \n " ,
34+ " return \" Found\" \n " ,
35+ " return \" Not Found\"\n " ,
36+ " \n " ,
37+ " arr = []\n " ,
38+ " n=int(input(\" Enter N\" ))\n " ,
39+ " for x in range(n):\n " ,
40+ " arr.append(int(input()))\n " ,
41+ " x=int(input(\" Enter Key\" ))\n " ,
42+ " print(search(arr,x))\n " ,
43+ " "
44+ ]
45+ }
46+ ],
47+ "metadata" : {
48+ "kernelspec" : {
49+ "display_name" : " Python 3" ,
50+ "language" : " python" ,
51+ "name" : " python3"
52+ },
53+ "language_info" : {
54+ "codemirror_mode" : {
55+ "name" : " ipython" ,
56+ "version" : 3
57+ },
58+ "file_extension" : " .py" ,
59+ "mimetype" : " text/x-python" ,
60+ "name" : " python" ,
61+ "nbconvert_exporter" : " python" ,
62+ "pygments_lexer" : " ipython3" ,
63+ "version" : " 3.7.4"
64+ }
65+ },
66+ "nbformat" : 4 ,
67+ "nbformat_minor" : 4
68+ }
Original file line number Diff line number Diff line change 22 "cells" : [
33 {
44 "cell_type" : " code" ,
5- "execution_count" : 3 ,
5+ "execution_count" : 4 ,
66 "metadata" : {},
77 "outputs" : [
88 {
You can’t perform that action at this time.
0 commit comments