Python Program
Write a program to print the following, Given a word W and pattern P, you need to check whether the pattern matches the given word.The word will only contain letters(can be Uppercase and Lowercase). The pattern can contain letters, ? and *.
? : Can be matched with any single letter.
* : Can be matched with any sequence of letters (including an empty sequence).
If the pattern matches with the given word, print True else False.
Sample Input1
3
Hello *l?
Hell He?ll
Hell ?*
Sample Output1
True
False
True
Sample Input1
3
Hello Hell*
Hell He*ll
Hell hell*
Sample Output1
True
True
False
Write a program to print the following output.
Input
The first line contains a string.
The second line contains some space-separated strings.
Output
The output should be a single integer.
Explanation
scramble word = "tacren"
guessed words = ["trance", "recant"]
Since "trance" and "recant" both have length 6 then you score 54 pts each.
So the output is 108.
Sample Input1
rceast
cat create sat
Sample Output1
2
Sample Input2
tacren
trance recant
Sample Output2
108
Write a python program to print the following output.
Input
The first line of input contains a single line positive integer N.
The second line of input contains a space-separated integers denoting the cost of the item.
Output
The output is a single line integer.
Explanation
For example, Given N = 2 and cost = 10 200
Ram has to pay for both the items, he won't get anything for free.
So the output is 210.
Sample Input1
4
1 1 2 2
Sample Output1
4
Sample Input2
2
10 200
Sample Output2
210
int x = 32 % 4;
int y= 21 / 15;
cout << x < y;
Create a program that will allow user to enter 10 names od teacher A's students to be stored in array name stud_name then display vertically
Create a program that will allow user to enter 10 names od teacher A's students to be stored in array name stud_name then display vertically
Create a program that will store the values 90 88 78 95 in array name Grades, then display horizontally with 5 space each value.
Convert the following IEEE single-precision floating point numbers from hex to decimal:
a. 42F48000
b. CAB00000
c. 00700000
d. 3ABC0000
Create a c++ program that asks the user to input the full name 10 times using for, do while and while loop. Then display.
Construct a c++ program to compute the sum of the digits of the numbers input from the user. Display the number input by the user as well as the sum. Use for loop Control structure.