Robotics & Artificial Intelligence
Write Python code to display the following pattern:
1 3 5 7 9
1 3 5 7
1 3 5
1 3
1
Related Questions
A number is said to be 'Happy number' if eventual sum of the square of its digits results in 1. Write a Python code to input a number and check whether it is a Happy Number or not.
Sample Input: 31
Sample Output: 31 = 32 + 12 = 10 = 12 + 0 = 1
Hence, it is a Happy Number
Write Python code to display the following pattern:
5 4 3 2 1 5 4 3 2 5 4 3 5 4 5Write Python code to display the following pattern:
5 5 4 5 4 3 5 4 3 2 5 4 3 2 1Write Python code to display the following pattern:
1 3 5 5 7 9 7 9 11 13 9 11 13 15 17