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
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 01
Create a Python function that takes a number as a parameter and check the number is PRIME or NOT.
Note: A prime number (or a prime) is a natural number greater than 1 and that has no positive divisors other than 1 and itself.
Clas calld Author is desiged tomodel book author.Contan:3private intance varable:name(String),email(String),and gender(char of either 'm' or 'f');An__init__() toinitalize the nme,email,gendr with given value Getters/Setters: getName(),getEmail(),setEmail(),and getGender()(There areno seter for nameandgender, asthese atribute canotbe changd.)A__str__() metodthat return prntable string oftht objct with folowing formt:
"Author[name=?,email=?,gender=?]"
e.g., "Author[name=Tan Ah Teck,email=ahTeck@somewhere.com,gender=m]". Write the Author clas.Writetest driver code totest all public functon e.g.,
ahTeck=Author("Tan Ah Teck", "ahteck@nowhere.com", 'm')#Test the constructor
print(ahTeck) # Test __str__()
ahTeck.setEmail("paulTan@nowhere.com") #Test setter
print("Name is: ", ahTeck.getName())#Test getter
print("Email is: ", ahTeck.getEmail())#Test getter
print("Gender is: ",ahTeck.getGender())#Test getter.
The Rectangular Rule A. The rectangular rule (also called the midpoint rule) is perhaps the simplest of the three methods for estimating an integral. i. Integrate over an interval a ≤ x ≤ b. ii. Divide this interval up into n equal subintervals of length h = (b − a)/n. iii.Approximate f in each subinterval by f(x*j ), where x*j is the midpoint of the subinterval. iv. Area of each rectangle: f(x*j)h, f(x*j)h,. . . , f(x*n)h. The approximation on the RHS becomes more accurate as more rectangles are used. In fact, You are required to: v. write pseudocode algorithm to determine the integral of a function between two specified points using the rectangular rule. vi. write C++ computer programs to determine the integral of a function between two specified points using the rectangular rule.
let's build a Speed Typing Test by using the dynamic concepts of javascript
a) Write a method PopulationTotal that accepts 2 positive values, namely the current
A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings), separated by a comma. That list is followed by a name, and your program should output the phone number associated with that name. Output "None" if name is not found.
Ex: If the input is:
3 Joe,123-5432 Linda,983-4123 Frank,867-5309 Frankthe output is:
867-5309Your program must define and call the following function. The return value of GetPhoneNumber is the phone number associated with the specific contact name.
string GetPhoneNumber(vector<string> nameVec, vector<string> phoneNumberVec, string contactName)
Hint: Use two vectors: One for the string names, and the other for the string phone numbers.
Make a program that will accepts two numbers (first number is for birth month, second number is for birth date) and display its zodiac sign using combined equality and logical operators.
Make a program that will compute and display the sum, difference, product and quotient of two numbers.