Write a program to print the following,
Sample Input1
after
4
a b c d
f e f g
t e r r
a b i j
Sample Output1
[(0, 0), (1, 0), (2, 0), (2, 1), (2, 2)]
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
Create an Assembly Language Program with the following arithmetic operations.
a.) 2+2-3+1*2-2 = 2
b.) 5-1*2+1-7*2 = 4
A triangular number is defined as m(m + 1)/2 for m = 1, 2, …, and so on. Therefore, the first few numbers are 1, 3, 6, 10, … . Write a function with the following header that returns a triangular number:
int getTriangularNumber (int n)
Write a test program that uses this function to display the first 75 triangular numbers with 5 numbers on each line.
create two variables: one containing the uppercase character 'G' and the other with uppercase letter 'O'. You can name the variable anything you want as long as it's a valid name that accepted in C.
Input a random positive integer. Then, create an integer array with a size the same as the inputted integer.
Then, using loops, add random integer values into the array one by one. The number of values to be stored is dependent on the inputted odd integer on the first instruction.
Print out the list's new order in this manner, with each number separated by a space per row:
second-half values
middle value
first-half values
Refer to the sample output for a clearer view on how it is to be printed out.
Input a random positive integer, n.
Create an empty character array with a size of the inputted random positive integer, n.
In the next succeeding lines, store the n characters into the character array.
Input an integer, m, for an index. This value should be from 0 to n - 1.
Using your understanding on accessing array elements, access and print out the array element having the index position of the inputted random integer, m.
An array containing 10 predefined double values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first.
Each outputted value must also only show up to two decimal places.
A string with any message. Then, determine if the message contains the string, "hello".