Skip to content

Commit af3437d

Browse files
committed
updated
1 parent fa9f5df commit af3437d

7 files changed

+200
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}

Untitled3.ipynb

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 8,
6+
"id": "a1dd8233",
7+
"metadata": {},
8+
"outputs": [
9+
{
10+
"name": "stdout",
11+
"output_type": "stream",
12+
"text": [
13+
"Enter something here: bh j jj jj jhj\n",
14+
"5\n"
15+
]
16+
}
17+
],
18+
"source": [
19+
"#to find word in string\n",
20+
"string=input('Enter something here: ')\n",
21+
"f=' '\n",
22+
"c=0\n",
23+
"for i in string:\n",
24+
" if i==f:\n",
25+
" c +=1\n",
26+
"else:\n",
27+
" print(c+1)"
28+
]
29+
},
30+
{
31+
"cell_type": "code",
32+
"execution_count": null,
33+
"id": "0fa35bcd",
34+
"metadata": {},
35+
"outputs": [],
36+
"source": []
37+
}
38+
],
39+
"metadata": {
40+
"kernelspec": {
41+
"display_name": "Python 3 (ipykernel)",
42+
"language": "python",
43+
"name": "python3"
44+
},
45+
"language_info": {
46+
"codemirror_mode": {
47+
"name": "ipython",
48+
"version": 3
49+
},
50+
"file_extension": ".py",
51+
"mimetype": "text/x-python",
52+
"name": "python",
53+
"nbconvert_exporter": "python",
54+
"pygments_lexer": "ipython3",
55+
"version": "3.9.12"
56+
}
57+
},
58+
"nbformat": 4,
59+
"nbformat_minor": 5
60+
}

desktop.ini

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[ViewState]
2+
Mode=
3+
Vid=
4+
FolderType=Generic

find lenth of string.ipynb

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "373ac483",
7+
"metadata": {},
8+
"outputs": [
9+
{
10+
"name": "stdout",
11+
"output_type": "stream",
12+
"text": [
13+
"enter a string: 6464 hasbdsd 454\n",
14+
"16\n"
15+
]
16+
}
17+
],
18+
"source": [
19+
"string=input('enter a string: ')\n",
20+
"c=0\n",
21+
"for i in string:\n",
22+
" c += 1\n",
23+
"else:\n",
24+
" print(c)"
25+
]
26+
},
27+
{
28+
"cell_type": "code",
29+
"execution_count": null,
30+
"id": "75396b47",
31+
"metadata": {},
32+
"outputs": [],
33+
"source": []
34+
}
35+
],
36+
"metadata": {
37+
"kernelspec": {
38+
"display_name": "Python 3 (ipykernel)",
39+
"language": "python",
40+
"name": "python3"
41+
},
42+
"language_info": {
43+
"codemirror_mode": {
44+
"name": "ipython",
45+
"version": 3
46+
},
47+
"file_extension": ".py",
48+
"mimetype": "text/x-python",
49+
"name": "python",
50+
"nbconvert_exporter": "python",
51+
"pygments_lexer": "ipython3",
52+
"version": "3.9.12"
53+
}
54+
},
55+
"nbformat": 4,
56+
"nbformat_minor": 5
57+
}

find_factorial.ipynb

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "a6603976",
7+
"metadata": {},
8+
"outputs": [
9+
{
10+
"name": "stdout",
11+
"output_type": "stream",
12+
"text": [
13+
"Enter a number: 52\n",
14+
"the factorial of 52 is 80658175170943878571660636856403766975289505440883277824000000000000\n"
15+
]
16+
}
17+
],
18+
"source": [
19+
"num=int(input('Enter a number: '))\n",
20+
"factorial=1\n",
21+
"if num<0:\n",
22+
" print(\"sorry factorial does not exits for nagetive number\")\n",
23+
"elif num==0:\n",
24+
" print(\"the factorial of 0 is 1\")\n",
25+
"else:\n",
26+
" for i in range(1, num+1):\n",
27+
" factorial = factorial*i\n",
28+
" print(\"the factorial of\",num,\"is\",factorial)"
29+
]
30+
},
31+
{
32+
"cell_type": "code",
33+
"execution_count": null,
34+
"id": "1134ab64",
35+
"metadata": {},
36+
"outputs": [],
37+
"source": []
38+
}
39+
],
40+
"metadata": {
41+
"kernelspec": {
42+
"display_name": "Python 3 (ipykernel)",
43+
"language": "python",
44+
"name": "python3"
45+
},
46+
"language_info": {
47+
"codemirror_mode": {
48+
"name": "ipython",
49+
"version": 3
50+
},
51+
"file_extension": ".py",
52+
"mimetype": "text/x-python",
53+
"name": "python",
54+
"nbconvert_exporter": "python",
55+
"pygments_lexer": "ipython3",
56+
"version": "3.9.12"
57+
}
58+
},
59+
"nbformat": 4,
60+
"nbformat_minor": 5
61+
}

0 commit comments

Comments
 (0)