Skip to content

Commit 4399127

Browse files
authored
Add files via upload
0 parents  commit 4399127

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed

A-1.ipynb

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## 1. Program to find all numbers which are divisible by 7 and are not a multiple of 5. Between 2000 and 3200 "
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": 1,
13+
"metadata": {},
14+
"outputs": [
15+
{
16+
"name": "stdout",
17+
"output_type": "stream",
18+
"text": [
19+
"2002,2009,2016,2023,2037,2044,2051,2058,2072,2079,2086,2093,2107,2114,2121,2128,2142,2149,2156,2163,2177,2184,2191,2198,2212,2219,2226,2233,2247,2254,2261,2268,2282,2289,2296,2303,2317,2324,2331,2338,2352,2359,2366,2373,2387,2394,2401,2408,2422,2429,2436,2443,2457,2464,2471,2478,2492,2499,2506,2513,2527,2534,2541,2548,2562,2569,2576,2583,2597,2604,2611,2618,2632,2639,2646,2653,2667,2674,2681,2688,2702,2709,2716,2723,2737,2744,2751,2758,2772,2779,2786,2793,2807,2814,2821,2828,2842,2849,2856,2863,2877,2884,2891,2898,2912,2919,2926,2933,2947,2954,2961,2968,2982,2989,2996,3003,3017,3024,3031,3038,3052,3059,3066,3073,3087,3094,3101,3108,3122,3129,3136,3143,3157,3164,3171,3178,3192,3199,"
20+
]
21+
}
22+
],
23+
"source": [
24+
"for i in range(2000, 3201):\n",
25+
" \n",
26+
" if i%7==0 and i%5!=0:\n",
27+
" print(i, end=',')\n"
28+
]
29+
},
30+
{
31+
"cell_type": "markdown",
32+
"metadata": {},
33+
"source": [
34+
"## 2. Program to accept the user's first and last name and then getting them printed in the the reverse order with a space between first name and last name."
35+
]
36+
},
37+
{
38+
"cell_type": "code",
39+
"execution_count": 3,
40+
"metadata": {},
41+
"outputs": [
42+
{
43+
"name": "stdout",
44+
"output_type": "stream",
45+
"text": [
46+
"What is your name?:pari\n",
47+
"What is your last name?modi\n",
48+
"irap idom\n"
49+
]
50+
}
51+
],
52+
"source": [
53+
"first_name = input(\"What is your name?:\")\n",
54+
"last_name = input(\"What is your last name?\")\n",
55+
"print(first_name[::-1] + \" \" + last_name[::-1])"
56+
]
57+
},
58+
{
59+
"cell_type": "markdown",
60+
"metadata": {},
61+
"source": [
62+
"## 3. Write a Python program to find the volume of a sphere with diameter 12 cm."
63+
]
64+
},
65+
{
66+
"cell_type": "code",
67+
"execution_count": 7,
68+
"metadata": {},
69+
"outputs": [
70+
{
71+
"data": {
72+
"text/plain": [
73+
"904.3199999999999"
74+
]
75+
},
76+
"execution_count": 7,
77+
"metadata": {},
78+
"output_type": "execute_result"
79+
}
80+
],
81+
"source": [
82+
"d= 12\n",
83+
"pi = 3.14\n",
84+
"r = d/2\n",
85+
"v = (4/3 * pi )* pow(r, 3)\n",
86+
"v"
87+
]
88+
}
89+
],
90+
"metadata": {
91+
"kernelspec": {
92+
"display_name": "Python 3",
93+
"language": "python",
94+
"name": "python3"
95+
},
96+
"language_info": {
97+
"codemirror_mode": {
98+
"name": "ipython",
99+
"version": 3
100+
},
101+
"file_extension": ".py",
102+
"mimetype": "text/x-python",
103+
"name": "python",
104+
"nbconvert_exporter": "python",
105+
"pygments_lexer": "ipython3",
106+
"version": "3.8.3"
107+
}
108+
},
109+
"nbformat": 4,
110+
"nbformat_minor": 4
111+
}

0 commit comments

Comments
 (0)