Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.
Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.
Given an integer N as input, write a program to print a number diamond of 2*N -1 rows
Note: There is a space after each number
write a program to print a shaded diamond of 2*N -1 rows using an asterisk(*)
Write a program to print
W pattern of N lines using an asterisk(*) character as shown below.
Note: There is a space after each asterisk * character.
Given an integer value
N as input, write a program to print a shaded diamond of 2*N -1 rows using an asterisk(*) character as shown below.
Note: There is a space after each asterisk (*) character.
Given an integer
N as input, write a program to print a number diamond of 2*N -1 rows as shown below.
Note: There is a space after each number.
ASSIGNMENT - 11
You are given a string, write a program to find whether the string is palindrome or not.
The first line of input is a string.
The output should be
In the given example, the string
No lemon no melon is a palindrome as we are ignoring spaces. So, the output should be True.
Sample Input 1
No lemon no melon
Sample Output 1
True
Sample Input 2
Race Cars
Sample Output 2
False
First and Last Elements of List
You are given an integer
The first line of input is an integer
In the given example, we are given
6 numbers 1, 2, 3, 4, 5, 6 as input.The list should contain first two integers
1, 2 and last two integers 5, 6 So, the output should be [1, 2, 5, 6].
Sample Input 1
6
1
2
3
4
5
6
Sample Output 1
[1, 2, 5, 6]
Sample Input 2
5
1
11
13
21
19
Sample Output 2
[1, 11, 21, 19]
ASSIGNMENT - 2
Largest Number in the List
You are given space-separated integers as input. Write a program to print the maximum number among the given numbers.
The first line of input contains space-separated integers.
In the example, the integers given are
1, 0, 3, 2, 9, 8. The maximum number present among them is 9. So, the output should be 9.
Sample Input 1
1 0 3 2 9 8
Sample Output 1
9
Sample Input 2
-1 -3 -4 0
Sample Output 2