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

Write a program with a loop that repeatedly reads a string as input, where the string is either "duck" or "goose". The loop terminates when "goose" is entered. After the loop, your code should print out the number of "duck" strings that were read.


NOTE: When reading the input, do not display a prompt for the user. Use the input()function with no prompt string. Here is an example:


bird = input()


1.    Count and display the country which is a member of the EU (EU = yes) and not a member of the EU (EU = no).


Add two polynomials

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

two polynomials A and B.




Output


Print the addition of polynomials A and B.


If the term with highest degree is negative, the term should be represented as -Cix^ ^ Pi .


For the term where power is 1 represent it as C1x instead of Cl*^ ^ 1 .


If the degree of polynomial is zero and the constant term is also ero, then just print 0 to represent the polynomial. For Lerm Cix^ ^ p i if the coefficient of the term Ci is 1, simply print x ^ P * i


instead of 7x p1


Explanation


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.


If N = 3 and for polynomial B

For power 0, co-efficient is 1

For power 1, co-efficient is 2

For power 2, co-efficient is 4.


And if result is zero print 0.


And if result has 1x solution it only x.





  1. Count and display the number of cities per country.
  2. Count and display the country which is a member of the EU (EU = yes) and not a member of the EU (EU = no).
  3. Find and display the country with the highest and lowest total population.
  4. Count and display the country with a coastline (coastline = yes) and without a coastline (coastline = no)

Difficult Addition


Arjun is trying to add two numbers. Since he has learned addition recently, an addition which requires a carry is difficult for him. Your task is to print Easy if the addition does not involve a carry, Otherwise print Hard.


Input

The first line of input contains two space separated integers A and B.


Output

If the addition does not involve a carry,print Easy, otherwise print Hard.


Explanation

When calculating 229 + 390, we have a carry from the tens digit to the hundreds digit, so the answer is Hard.


Sample Input1

229 390

Sample Output1

Hard


Sample Input2

123456789 9876543218

Sample Output2

Easy


Write a python function Write_String(fanme, *list)  which take a list containing string elements and write them in a file myfile.txt until the string “finish” (not case sensitive) occur. The function then returns the contents written in file as a string. Before writing list elements in file, you also need to make a separate python function to check whether input list contains "Finish" or not. If not, then it should return error as shown in example.


myfile.txt:

Python

Java

C

C++

Ruby

.Net


 

Example-1

Example-2

Example-3

Input:

myfile.txt

["Python", "Java", "C", "C++", "Finish"]

 

Output:

PythonJavaCC++

 

Input:

myfile.txt

["Python", "Java", "C", "C++", "Finish",".Net", "Rubby"]

 

Output:

PythonJavaCC++Input:


myfile.txt

["Python", "Java", "C", "C++"]

 

Output:


Error: List does not contain Finish

 



Binomial births In the U.S., 49% of births are female. Assume the sexes of babies are independent of each other. Find the following probabilities using stats.btnom.pnf, stats, binom.cdf, and arithmetic. The stats library of scipy has been imported in the top cell of this notebook. (a) Find the chance that among 20 births, the majority (more than half) are female. Save your answer in the variable called port


Difficult Addition


Arjun is trying to add two numbers. Since he has learned addition recently, an addition which requires a carry is difficult for him. Your task is to print Easy if the addition does not involve a carry, Otherwise print Hard.


Input

The first line of input contains two space separated integers A and B.


Output

If the addition does not involve a carry,print Easy, otherwise print Hard.


Explanation

When calculating 229 + 390, we have a carry from the tens digit to the hundreds digit, so the answer is Hard.


Sample Input1

229 390

Sample Output1

Hard


Sample Input2

123456789 9876543218

Sample Output2

Easy


Write A phyton code to read A dataset and print all Features i.e. columns of the dataset. Determine the descriptive statics i.e. maximum, minimum mean median, count, variance, standard deviation etc. of the numeric Features like age, salary, etc. May be present in the dataset.


Write A phyton code to read A dataset and print all Features i.e. columns of the dataset. Determine the descriptive statics i.e. maximum, minimum mean median, count, variance, standard deviation etc. of the numeric Features like age, salary, etc. May be present in the dataset.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS