Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a program to print the following,


Input

The first line contains a string representing a scrambled word.

The second line contains some space-separated strings representing words guessed by the player.


Output

The output should be a single integer of the final score.


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

tacren

trance recant


Sample Output1

108


Number of moves:


you are given a nxn square chessboard with one bishop and k number of obstacles placed on it. A bishop can go to different places in a single move. find the total no.of places that are possible for the bishop in a single move. Each square is referenced by a type describing the row, R, and column, C, where the square is located.


explanation: given N=6 K=2


bishop position 5 2


obstacle positions (2 2), (1 5)


the bishop can move in so o/p is 6


I/p:


6 2


5 2


2 2


1 6


O/p:


6


I/p:


6 4


3 3


1 3


3 1


5 1


1 5


O/p: 7



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 input 1

3

Hello Helll*

Hell He*ll

Hell hell*


Sample output 1

True

True

False


Sample Input 2

3

Hello *l?

Hell He?ll

Hell ?*


Sample Output 2

True

False

True






Elle Joy Vasquez



Preliminary Test 02


Create Python function that checks whether a passed string is PALINDROME or NOT.


Note: A palindrome is a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run.

Elle Joy Vasquez


Preliminary Test 04


Create a Python function that takes a list of n integers and returns the largest number among the n integers.

Elle Joy Vasquez


Preliminary Test 03


Create a Python function that takes a list and returns a new list with unique elements of the first list.


Sample List: [1,2,3,3,3,3,4,5]


Unique List: [1, 2, 3, 4, 5]

your friend gave you an encrypted text. He encrypted the text using the Alphabet Square cipher. It is a simple substitution cipher that make use of a square grid. The letters a-z written into the grid, with i and j typically sharing a slot (as there are 26 letters and Only 25 slots).This cipher generally takes a plain text as input and gives encrypted text as output.

To encipher a message ,each letter is merely replaced by its row and columns numbers in the grid.

Your given an encrypted string S as input print the decrypted text using the Alphabet Square.

NOTE:The input contains lowercase letters as the string.


Create a Python function that takes a list and returns a new list with unique elements of the first list.


Sample List : [1,2,3,3,3,3,4,5]

Unique List : [1, 2, 3, 4, 5]


I need the code to have an output stated above.


Create a Python function that takes a number as a parameter and check the number is

PRIME or NOT.


I need the code to have an output stated above.


1. Create a reflection of the given image.

2. Submit the code


images name(mt-rainier.jpg)


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS