Write an assembly program for add of two eight bit no. at
4000H=2CH and 4001H=30H and save result at 4002H
Given the number of rows N, write a program to print the hallow diamond pattern similar to the pattern shown below.
A
B B
C C
D D
E E
D D
C C
B B
AThe input will be a single line containing a positive integer (N).Output
The output should be (2*N - 1) rows and (2*N - 1) columns containing the alphabet characters in the hollow diamond pattern.Explanation
For example, if the given number is 5, the pattern should contain 9 rows and 9 columns as shown below.
A
B B
C C
D D
E E
D D
C C
B B
ANOTE:
NO SPACES ON LEFT SIDE FOR DIAMOND
You have got homework in N subjects for each homework you require a minimum of min energy and consume actual energy while doing it.
Example, if for a other home work mini=12 and actuality=10, you require at least 12 energy for starting this homework. If u have 11 energy or less you cannot do this homework.
Calculate the minimum intial energy required to complete all the homework
Note : you can finish the homework in any order you like
Constraints
1<=N<=10^5
1<=actual [i]<=10^3
1<=min[I]<=10^3
Word Count
Given a sentence S, write a program to print the frequency of each word in S. The output order should correspond with the word's input order of appearance.
Input
The input will be a single line containing a sentence S.
Output
The output contains multiple lines, with each line containing a word and its count separated by ": " with the order of appearance in the given sentence.
Prefix Suffix
Write a program to check the overlapping of one string's suffix with the prefix of another string.
Input
The first line of the input will contain a string A.
The second line of the input will contain a string B.
Output
The output should contain overlapping word if present else print "No overlapping".
Polynomial
Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0 format.
Input
The first line contains a single integer N.
Next N lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.
Output
Print the polynomial in the format Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0, where Pi's are powers in decreasing order, Ci is coefficient, and C0 is constant. There will be space before and after the plus or minus sign.
If the coefficient is zero, then don't print the term.
If the term with the highest degree is negative, the term should represent -Cix^Pi.
For the term where power is 1, represent it as C1x instead of C1x^1.
If the polynomial degree is zero and the constant term is also zero, then print 0 to represent the polynomial.
For term Cix^Pi, if the coefficient of the term Ci is 1, print x^Pi instead of 1x^Pi.
Explanation
If N = 4
For power 0, the coefficient is 5
For power 1, the coefficient is 0
For power 2, the coefficient is 10
For power 3, the coefficient is 6.
Then polynomial represents "6x^3 + 10x^2 + 5"
Constraints
N <= 100
0 <= Pi < 1000
-1000 <= Ci <= 1000
Sample Input
4
0 5
1 0
2 10
3 6
Sample Output
6x^3 + 10x^2 + 5
If the user enters 'A', ask the user for the following information for a SINGLE student and then store it:
1) id (it is unique to each student and can be any integer between 0 and 99).
2) first initial (can be any character between A and Z). Example: In the case of Aadil Khan the first initial is A.
3) last initial (can be any character between A and Z). Example: In the case of Aadil Khan the last initial is K.
4) GPA (can be any floating-point value between 0.0 and 4.0)
5) course marks (can be any integer value between 0 and 100)
This information can be stored in multiple separate arrays, or in a single array of structures (also known as a struct). For this task, assume the user will only enter correct values and you do not have to check for wrong input. As soon as the user enters the value for one student, the menu will be displayed again.
If the user enters 'B', a loop will run and display all the values stored up till that point. If there is no information, tell the user “Empty Database”.
If the user enters 'C', the user would be asked to enter the id, and the program would display all the information stored for that id. If the id doesn't exist, the program would inform the user “ID Doesn’t Exist”.
If the user enters 'D', a loop will run and calculate the average of all the course marks stored up till that point. If there is no information, tell the user “Empty Database”.
If the user enters 'E', the user would be asked to enter the GPA. A loop will run and display the information of all the students who have a GPA greater or equal to that. If there is no information, tell the user “Not Found”.
If the user enters 'F', display “Have a nice day” and then exit the program.
Menu)
In an infinite loop, provide the user the following options:
A) Save student information (Assume there will not be more than eleven students)
B) Display information of all students
C) Search the student by id and display only that student's information
D) Calculate and display the average course marks of the entire class
E) Display the information of all the students who have a GPA more than x (x is a value entered by the user)
F) Quit.
To select an option, the user would either input A, or B, or C, or D, or E, or F. For any input other than these, the user would be told “Invalid choice” and the menu will be displayed again.
RUN THE CODE ONCE AND ATTACH A SCREENSHOT OF THE MENU IN YOUR WORD DOCUMENT
Alphabetic Symbol
Write a program to print the right alphabetic triangle up to the given N rows.Input
The input will be a single line containing a positive integer (N).Output
The output should be N rows with letters.
Note: There is a space after each letter
.Explanation
For example, if the given number of rows is 4,
your code should print the following pattern.
A
A B
A B C
A B C DAfter selecting the random experiment, write a Python program that performs the following:
(The experiment I chose is : Random experiment = Number of calls you receive on your mobile phone from 8 am to 4 pm. Sample space = { 0,1,4,6,8}
a. Generate a sample path using 1000 trials of the random experiment.
b. Compute the average of the sample path (e.g., for experiment 1, this number is the average number of calls)
c. Compute the probability that the outcome of the random experiment is greater than the average computed in (b). Use the same sample path generated in (a).