Python Assignment Solved ( Class 9 )
Python Assignment Solved ( Class 9 )
---
Example Output:
Enter a number: -3
The number is negative.
---
Example Output:
Enter a number: 7
The number is odd.
---
Example Output:
---
Example Output:
---
Example Output:
---
6. Print Numbers from 1 to N
Example Output:
Enter a number N: 5
12345
---
Example Output:
Enter a number N: 5
The sum of numbers from 1 to 5 is 15.
---
Example Output:
21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69
---
Example Output:
Enter a number N: 4
Square of 1 is 1
Square of 2 is 4
Square of 3 is 9
Square of 4 is 16
---
Example Output:
50 49 48 47 46 45 44 43 42 41 40