Questions: 5 831

Answers by our Experts: 5 728

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

composite numbers in the range


you are given two integers m and n .write a program to print all the composite numbers between m and n, (including m and n)


1)inputs are 2 and 9


in the given example the composite numbers present in range of 2 and 9 are 4,6,8,9

the output is

4

6

8

9



2)inputs are 1 and 4

the output is

4

In a wedding that you are attending, there are some chairs that have digits inscribed at their



backs. The chairs are lined in a row such that they form a string of the digits. Find the



minimum number of sets M that can be formed from these digits such that:



1. The number of digits in each set is one gf more than one.



2. Each set is formed using consecutive digits and no digit can be used more than once.



3. In each set, the number formed using the digits is less than or equal to Y. using three inputs

given an integer N the task to find the minimum absoulte difference between N and a closest N number power of 2


Ascend!

by CodeChum Admin

Hey I’ve got this cool idea for an app! It’s kind of simple but just hear me out. All the user has to do is enter a bunch of integers. Then the application prints the largest sum of a strictly ascending sequence of the array. A strictly ascending sequence is a sequence where the current number is always lesser than the next number. 


For example, the user enters 2 4 5 1 7 3, the output should be 11 (2 + 4 + 5).


Then that’s it! I think this is going to be a hit! Don’t you think? Well I do. If you help me then we’re going to be rich!


Note: For this problem, a sequence must contain at least 2 numbers. If there is no sequence found, then the largest sum is 0.

Input


1. The size of the array


Constraints

The value is within the range: 0 <= size <= 2147483647

2. Elements of the array


Constraints

Each element <= 2147483647 and >= 0

Output


5. Big-Sightedness

by CodeChum Admin

I got my grandmother a new phone because I thought that we could talk more everyday by texting. Well, let’s just say that my grandma’s eyes aren’t the best anymore so she can’t really see what I text her and because of that she wants to ditch texting and stick with carrier pigeons. You know how embarrassing it is for a kid like me to be seen using carrier pigeons?!?! Well, anyway, I was hoping that you could make a program that takes my text and make it bigger, a LOT bigger. How about you test it out by only using the letters A, B, and C first.


Input


1. My text


Description

This is a string with characters A, B, and C.

Constraints

It is guaranteed that all letters are in uppercase.

Output


The first line will contain a message prompt to input my text.

The succeeding lines will contain the enlarged text.


Write a  PYTHON function to get the input from the user to go with words given on the fly (input through keyboard) or read it from a file.  At least it should contain a single word otherwise throw an error to the user rather than showing a PYTHON error.


Shuffle letters of words evenly and oddly except the first and last character when we run it again and again. You need to store the modified one so everytime you run it changes.  Keep the odd one in one color and even in another color and keep black for the first and last character

Adcricnog to reacersh at an Engslih Urvtisniey, it deosn't mttear in waht oedrr the ltreets in a wrod are, the olny itopmanrt tih

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.


Sample Input 1

5

0 2

1 3

2 1

4 7


Sample output 1

7x^4 + 6x^3 + x^2 + 3x + 2


Sample input 2

4

0 5

1 0

2 10

3 6


Sample output 2

6x^3 + 10x^2 + 5


Add two Polynomials 


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


Sample input 1

4

0 5

1 0

2 10

3 6


Sample Output 1



Sample Input 2

4

0 5

1 0

2 10

3 6

3

0 1

1 2

2 4


Sample output 2

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


IPL Match Details


Write a program that reads all the match outcomes and summarizes the information of all the matches.

Points are given to the terms based on the outcome of the match.

A win earns a team 3 points.A draw earns 1.A loss earns 0.

The following information is expected:

MP:Matches Played

W:Matches Won

D:Matches Drawn(Tied)

L:Matches Lost

P:Points


The team information should be displayed in descending order of points.


Sample input 1

6

CSK;RR;loss

RR;DD;draw

MI;KKR;win

KKR;RR;loss

CSK;DD;draw

MI;DD; draw


Sample output 1

Team: RR, Matches Played: 3, Won: 2, Lost: 0, Draw: 1, Points: 7

Team: MI, Matches Played: 2, Won: 1, Lost: 0, Draw: 1, Points: 4

Team: DD, Matches Played: 3, Won: 0, Lost: 0, Draw: 3, Points: 3

Team: CSK, Matches Played: 2, Won: 0, Lost: 1, Draw: 1, Points: 1

Team: KKR, Matches Played: 2, Won: 0, Lost: 2, Draw: 0, Points: 0


Build a GPA calculator that inputs grades of 3 different subjects along with the credit hours

from the user and displays the user’s GPA. The input grades and their corresponding grading

points are given below.

Grade Points

A 4.0

A- 3.67

B+ 3.33

B 3.0

B- 2.67

C+ 2.33

C 2.0

C- 1.67

D+ 1.33

D 1.0

F 0


The formula is

GPA = (GP1 * CH1 + GP2 * CH2 + GP3 * CH3)/ (CH1 + CH2 + CH3)

Where GP1 is Points of Subject 1 and CH1 show credit hours of subject 1.


LATEST TUTORIALS
APPROVED BY CLIENTS