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

A/an_______ is a list of all the possible outcomes of a random variable and their associated probabilities of occurrence.

Select one:

a. uniform distribution

b. binomial distribution

c. exponential distribution

d. probability distribution


Write a program using standard string functions that

accepts a price of an item and display its coded value. The

base of the key is:

X C O M P U T E R S

0 1 2 3 4 5 6 7 8 9


Solve on paper, do rough work on the same paper.

  1. Write your university registration number. Underline the last three digits of your number.
  2. Consider the last three digits of your number a decimal number, convert it to a binary number.
  3. Add a binary 1 to the answer you got from part b.
  4. Convert the answer of part c, to hexadecimal number.
  5. Convert the answer of part c, to decimal number.
  6. Consider the last three digits of your number a hexadecimal number, convert it to a binary number.
  7. Convert 1100111110100000 binary to hexadecimal number.

Reverse Alternate Words in Sentence

Given a sentence, write a program to reverse the alternate words in the sentence and print it.


Reverse the first word and respective alternative words.

Input

The input will be a single line containing a sentence.

Output

The output should be a single line containing the sentence with the alternate words reversed.

Explanation

For example, if the given sentence is

Sun rises in the east and sets in the west The alternate words which need to be reversed are (Sun, in, east, sets, the), by reversing these words the output should be nuS rises ni the tsae and stes in eht west


Sample Input 1

Sun rises in the east and sets in the west


Sample Output 1

nuS rises ni the tsae and stes in eht west


Sample Input 2

The car turned the corner


Sample Output 2

ehT car denrut the renroc




Question 2 - Do it on computer, do any rough work required on paper.

a) Make a class with name as your university registration ID e.g. class F20200657890, with the following members:


  1. char [] name
  2. Float number
  3. int x_val
  4. int y_val
  5. Constructor without any parameter
  6. Constructor with all four parameters to set
  7. Copy constructor with proper deep copy
  8. Destructor
  9. Total 8, Set and Get functions, for each of Name, Number, x_val, and y_val.
  10. Operator + overload
  11. Operator << overload as friend function


b) Write main for the class, to demonstrate constructing two objects and using each of the member functions at least once. If you miss using any single function you lose some marks.




Given two polynomials A and B, write a program that adds the given two polynomials A and B.

The first line contains a single integer M.

Next M lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes co-efficient of Pi for polynomial A.

After that next line contains a single integer N.

Next N lines contain two integers Pj, Cj separated with space, where Pj denotes power and Cj denotes co-efficient of Pj for polynomial B.

If M = 4 and for polynomial A

For power 0, co-efficient is 5

For power 1, co-efficient is 0

For power 2, co-efficient is 10

For power 3, co-efficient is 6.


Then polynomial A represents "6x^3 + 10x^2 + 5", the polynomial B represents "4x^2 + 2x + 1" and the addition of A and B is "6x^3 + 14x^2 + 2x + 6"

sampel input 1

4

0 5

1 0

2 10

3 6

3

0 1

1 2

2 4

output

6x^3 + 14x^2 + 2x + 6

samplel input 2

5

0 -2

3 6

4 7

1 -3

2 -1

5

0 1

1 2

2 -4

3 3

4 5

output

12x^4 + 9x^3 - 5x^2 - x - 1



Please help me rearrange this code again and please correct it. I can't run it. Thank you!

n = int(input())


for i in range(n):

  1st = list(map(int,input().split()))

  lst1 = lst[1:]


  elem = lst1[0]

  counter = 1


for j in range (1,len(lst1)):


  if 2*elem > lst1[j]:

    counter = 0

    break

  elem = lst1[j]


  if counter == 1:

    print("Denominations: " lst1)

    print("Good coin denominations !")

    else:

      print("Denominations: " lst1)

      print("Bad coin denominations !")



Question1 - write a program, do rough work on the same program.
a) Write your university registration number. Underline the last three digits of your number.
b) Consider the last three digits of your number a decimal number, convert it to a binary number.
c) Add a binary 1 to the answer you got from part b.
d) Convert the answer of part c, to hexadecimal number.
e) Convert the answer of part c, to decimal number.
f) Consider the last three digits of your number a hexadecimal number, convert it to a binary number.
g) Convert 1100111110100000 binary to hexadecimal number.
For example registration number last three digit 156.

Explain triggers & stored procedures. Why do we use them?

Benefits of triggers & procedures. Syntaxes & example of them.


Secret Message - 2
Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.

Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.


a	b	c	d	e	f	g	h	i	j
1	2	3	4	5	6	7	8	9	10


k	l	m	n	o	p	q	r
11	12	13	14	15	16	17	18


s	t	u	v	w	x	y	z
19	20	21	22	23	24	25	26
Input

The input will be a string in the single line containing spaces and letters (both uppercase and lowercase).
Output

The output should be a single line containing the secret message. All characters in the output should be in lower case.
Explanation

For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".
LATEST TUTORIALS
APPROVED BY CLIENTS