Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eb4f68e

Browse files
Updates
1 parent 20b2523 commit eb4f68e

15 files changed

+49291
-13776
lines changed

‎.ipynb_checkpoints/Practice_code1-checkpoint.html

Lines changed: 14620 additions & 0 deletions
Large diffs are not rendered by default.

‎.ipynb_checkpoints/Practice_code1-checkpoint.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393
"name": "python",
394394
"nbconvert_exporter": "python",
395395
"pygments_lexer": "ipython3",
396-
"version": "3.9.4"
396+
"version": "3.9.6"
397397
}
398398
},
399399
"nbformat": 4,

‎.ipynb_checkpoints/Practice_code2-checkpoint.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Try working online at:
55
[Online Compiler and Debugger](https://www.onlinegdb.com/online_python_compiler)
66

77
**Q1:** Write a program to get a number as input and print if it is odd or even.
8+
89
>Sample1:
910
I/P: 10
1011
O/P: Even
@@ -29,13 +30,15 @@ O/P: Negative
2930
**Q3:** Write a program to get the mark of a student as input print his grade.
3031

3132
**Condition:**
32-
mark<0 or mark>100: Invalid
33-
90<mark<=100: O
34-
80<mark<=90: A+
35-
70<mark<=80: A
36-
60<mark<=70: B+
37-
50<=mark<=60 B
38-
mark<50: Fail
33+
```
34+
mark < 0 or mark > 100: Invalid
35+
90 < mark <= 100: O
36+
80 < mark <= 90 : A+
37+
70 < mark <= 80 : A
38+
60 < mark <= 70 : B+
39+
50 <= mark <= 60: B
40+
0 <= mark < 50: Fail
41+
```
3942

4043
>Sample1:
4144
I/P: 85
@@ -47,7 +50,7 @@ O/P: Fail
4750

4851
**Q4:** Write a program to get the age of the user and print if he is eligible to vote.
4952
**Condition:**
50-
A person is elgible to vote if his/her age is greater than or qual to 18
53+
A person is elgible to vote if his/her age is greater than or equal to 18
5154
>Sample1:
5255
I/P: 10
5356
O/P: Ineligible

‎.ipynb_checkpoints/Practice_code3-checkpoint.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,27 @@ O/p: 167
3636
**Q6:** Write a program to get a number ***n*** from the user and print its reverse as output.
3737

3838
**Q7:** Write a program to get a number and check if it is an armstrong number or not.
39-
**Condition:** A number is armstrong number if sum of cubes of its digit is equal to the number itself.
40-
>Sample1:
39+
**Condition:** Armstrong / Narcissistic number is the number in any given number base, which forms the total of the same number, when each of its digits is raised to the power of the number of digits in the number.
40+
>Sample 1:
4141
I/P:
4242
153
4343
O/P:
4444
Armstrong Number
4545
**Explanation:** $ 1^3 + 5^3 + 3^3 = 153 $
4646

47+
>Sample 2:
48+
I/P:
49+
407
50+
O/P:
51+
Armstrong Number
52+
**Explanation:** $ 4^3 + 0^3 + 7^3 = 407 $
53+
54+
>Sample 3:
55+
I/P:
56+
107
57+
O/P:
58+
Not an Armstrong Number
59+
4760
**Q8:** Write a program to get a number ***n*** and print its multiplication table from 1 to 20.
4861

4962
**Q9:** Write a program to get the values of ***n*** and ***n*** numbers from the user and print average of the ***n*** numbers rounded off to 4 decimal places as output.

‎Practice_code1.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393
"name": "python",
394394
"nbconvert_exporter": "python",
395395
"pygments_lexer": "ipython3",
396-
"version": "3.9.4"
396+
"version": "3.9.6"
397397
}
398398
},
399399
"nbformat": 4,

‎Practice_code2.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Try working online at:
55
[Online Compiler and Debugger](https://www.onlinegdb.com/online_python_compiler)
66

77
**Q1:** Write a program to get a number as input and print if it is odd or even.
8+
89
>Sample1:
910
I/P: 10
1011
O/P: Even
@@ -29,13 +30,15 @@ O/P: Negative
2930
**Q3:** Write a program to get the mark of a student as input print his grade.
3031

3132
**Condition:**
32-
mark<0 or mark>100: Invalid
33-
90<mark<=100: O
34-
80<mark<=90: A+
35-
70<mark<=80: A
36-
60<mark<=70: B+
37-
50<=mark<=60 B
38-
mark<50: Fail
33+
```
34+
mark < 0 or mark > 100: Invalid
35+
90 < mark <= 100: O
36+
80 < mark <= 90 : A+
37+
70 < mark <= 80 : A
38+
60 < mark <= 70 : B+
39+
50 <= mark <= 60: B
40+
0 <= mark < 50: Fail
41+
```
3942

4043
>Sample1:
4144
I/P: 85
@@ -47,7 +50,7 @@ O/P: Fail
4750

4851
**Q4:** Write a program to get the age of the user and print if he is eligible to vote.
4952
**Condition:**
50-
A person is elgible to vote if his/her age is greater than or qual to 18
53+
A person is elgible to vote if his/her age is greater than or equal to 18
5154
>Sample1:
5255
I/P: 10
5356
O/P: Ineligible

‎Practice_code3.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,27 @@ O/p: 167
3636
**Q6:** Write a program to get a number ***n*** from the user and print its reverse as output.
3737

3838
**Q7:** Write a program to get a number and check if it is an armstrong number or not.
39-
**Condition:** A number is armstrong number if sum of cubes of its digit is equal to the number itself.
40-
>Sample1:
39+
**Condition:** Armstrong / Narcissistic number is the number in any given number base, which forms the total of the same number, when each of its digits is raised to the power of the number of digits in the number.
40+
>Sample 1:
4141
I/P:
4242
153
4343
O/P:
4444
Armstrong Number
4545
**Explanation:** $ 1^3 + 5^3 + 3^3 = 153 $
4646

47+
>Sample 2:
48+
I/P:
49+
407
50+
O/P:
51+
Armstrong Number
52+
**Explanation:** $ 4^3 + 0^3 + 7^3 = 407 $
53+
54+
>Sample 3:
55+
I/P:
56+
107
57+
O/P:
58+
Not an Armstrong Number
59+
4760
**Q8:** Write a program to get a number ***n*** and print its multiplication table from 1 to 20.
4861

4962
**Q9:** Write a program to get the values of ***n*** and ***n*** numbers from the user and print average of the ***n*** numbers rounded off to 4 decimal places as output.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /