Q; Write a function to display the result of examination of students. Following requirements must be
fulfilled:
i. Read the names and marks of at least 5 students, data should be acquired from the user
and saved as dictionary (using a function named get info)
ii. Rank the top three students with highest marks (make a function named top3)
iii. Give cash rewards. Rs. 5000 for first rank, Rs. 3000 for second rank, Rs. 1000 for
third rank. Value cannot be modified (function name should be cashprize)
Write a function to display the result of examination of students. Following requirements must be fulfilled: i. Read the names and marks of at least 5 students, data should be acquired from the user and saved as dictionary (using a function named getinfo) ii. Rank the top three students with highest marks (make a function named top3) iii. Give cash rewards. Rs. 5000 for first rank, Rs. 3000 for second rank, Rs. 1000 for third rank. Value cannot be modified (function name should be cashprize)
How do you convert between the different python data types? What data quality issues arise when converting data types?
Given an MxN matrix filled with
The first line of input will be containing two space-separated integers, denoting M and N.
The next M lines will contain N space-separated integers, denoting the elements of the matrix.
The output should be a single line containing the area of the maximum square.
input:4 4 output :[13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14]
[[13, 9, 5, 1], [14, 6, 7, 2], [15, 10, 11, 3], [16, 12, 8, 4]]
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
3
the ouput should be like this:
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4
can anyone give the code correct?
Input: 6(number of students) {4 , 9 , 5 , 3 , 2 , 10}
Output: {0 , 0 , 1 , 3 , 4 , 0}Write a python program to create an array of 10 integers and display the array items. The array should be populated with random integers from 10 to 50. The program should also display separately all the even numbers within the array.
Given a matrix of order M*N and a value K, write a program to rotate each ring of the matrix clockwise by K elements. If in any ring has less than or equal to K elements, then don’t rotate that ring.Input
For example, if the given M and N are 4 and 4 respectively. If the matrix elements are
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
If the given K is 3. Rotate each ring of the matrix by 3 elements.
In the above matrix, the elements (1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5) is a ring, similarly, the elements (6, 7, 11, 10) will make a ring.
Therefore, by rotating each ring in clockwise direction by 3 elements will give (13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14) and (10, 6, 7, 11). So the output should be
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4
Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.
For example, if the given sentence is "python is a programming language", the possible unique combination of two are (a, is), (a, language), (a, programming), (a, python), (is, language), (is, programming), (is, python), (language, programming), (language, python), (programming, python). Out of these the combinations, (a, is), (a, programming), (is, python), (language, programming) are not valid as they contain words that are adjacent in the given sentence. So the output should be
a language
a python
is language
is programming
language python
programming python
Set1 and Set2 are the two sets that contain unique integers. Set3 is to be created by taking the union or intersection of Set1 and Set2 using the user defined function Operation(). Perform either union or intersection by reading choice from user. Do not use built in functions union() and intersection() and also the operators “|” and “&“.