Hollow Right Triangle
Given an integer number N as input. Write a program to print the hollow right-angled triangular pattern of N lines as shown below.
Note: There is a space after each asterisk (*) character.
Input
The first line of input is an integer N.
Explanation
In the given example the hollow right angled triangle of side
4. Therefore, the output should be
* * * *
* *
* *
*
Sample Input 1
4
Sample Output 1
* * * *
* *
* *
*
Sample Input 2
6
Sample Output 2
* * * * * *
* *
* *
* *
* *
*
in the above case only armstrong numbers can be printed.For,Example consider the two number that is "A" value should be 10 and "B" value should be 15. There is no armstrong number between these two intervals so we need to print a"-1".but the output should be shown empty value.how could we print -1 please explain that code
Write a program that uses two input statements to get two words as input. Then, print the words on one line separated by a space. Your program's output should only include the two words and a space between them.
Hint: To print both words on one line, remember that you can concatenate (add) two phrases by using the + symbol. Don't forget that you'll need to add a space between the words as well.
Sample Run
Enter a word: Good
Enter a word: morning
Good morningWrite code to output the following:
My favorite quote is, "Money talks"
Write a code to find out the sum of the sequence 2 -4 6 -8 10 -12.... while the last value will be determined from input. Use a loop to solve the problem.
Write a python program that asks the user to input six numbers and then print the summation and average of odd numbers only.
Sample Input:
3
5
2
4
8
9
Sample Output: Summation is 17 and average is 5.666666666666667