Create a Python function that takes a list of n integers and returns the largest number among the n integers.
I need the code to have an output stated above.
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]
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.
Write a program to print the following output,
Sample Input1
2
5
1 2 3 4 5
6
2 20 3 30 4 40
Sample Output1
33
201
Write a python statement that assigns the sum of 10 and 14 to the variable total
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)]