Andy has the word W and he wants to print the unique characters in the word in the order of their occurrence.write a program to help Andy print the unique characters as described above.
NOTE : consider lower and upper case letters as different
Input
The input is a single line containing the word W.
Output
The output should be a single line containing space separated characters.
Explanation
In the example, the word is MATHEMATICS
The unique characters in the given word are M, A, T, H, E, I, C, S, in the order of occurrence.so the output should be M A T H E I C S.
Sample Input1
MATHEMATICS
Sample Output1
M A T H E I C S
Sample Input2
banana
Sample Output2
b a n
Write a program to print a parallelogram pattern with * characters. The size N represents the length (the number of * characters in each line)& breadth ( the number of lines) of the parallelogram.
The slope of the parallelogram T represents the number of extra spaces a line should have in the beginning compared to its next line. The last line of the pattern does not have any spaces in the beginning.
Explanation:
Given N=3 and T=2, each line should have 3 star(*) characters.
The last line should have 0 spaces at the beginning.
Each line has 2 extra spaces characters when compared to its next line.
Sample Input1
2
2
Sample Output1
**
**Sample Input2
3
2
Sample Output2
***
***
***
You given a list of prices where prices[i] is the price of a given stock o the i th day write a program to print the maximum profit by choosing a single day to buy a stock and choosing a different day in the future to sell that stock if these is no profit that can be achieved return 0.
Input
The input is a single line containing space seperated integers.
Output
The output should be a single line integer.
Explanation
In the example the given prices are 7 1 5 3 6 4.
buying stocks on day two having price 1 and selling them on the fifth day having price 6 would give the maximum profit which is 6 - 1
so the output should be 5.
Sample Input1
1 2 1 3 6 7 4
Sample Output1
6
Create a program using Python for Eduvos based on the above scenario. The program should initially display a welcome message. The program should then do the following: 3.1 Prompt the user to enter the number of students to be captured. 3.2 Handle exceptions to ensure that the user enters a number. 3.3 Prompt the user to enter the student’s name, exam 1 and exam 2 marks. 3.4 Calculate the test average. 3.5 Use tuples to handle records. 3.6 The records should then be written to a file called studentsexammarks.txt. 3.7 The program should display the recorded test marks on the screen.
7)Write a Python program to count the number of characters (character frequency) in a string. without using functionwrite a program to find the sum S of the series where S = x - x^3 + x^5 + ..... upto N items.
How to use a loop(for loop or while loop) in a pseudocode algorithm?
Can I have an example?
[int(input()) for _ in range(n)]
in this line how we are using for loop aside of input() function can you explain
in this answer why we are using "_" operator and what is the use with it
Write a python program to count number of each characters in a string
For example python
P=1,y=1,t=1,h=1,o=1,n=1