Questions: 5 290

Answers by our Experts: 5 288

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

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.


numbers in string 2 :

if I given string is " I am 25 years and 10 months old " the numbers are 25 , 10 . code should print sum of the numbers 35, avg of the numbers 17.5 in the new line.

but if my input is Anjali25 is python4 the output should be sum of numbers 29 , avg of the numbers 14.5

how to write the program for this input Anjali25 is python4... have to check character by character...


Create and Print List -3:

You are given N numbers as input. Create a list and add the N numbers which are given as input and print the list.



Input:

The first line of input is an integer N. The next N lines each contain an integer.

Explanation:

In the given example,

N=4 and the numbers are 1, 2, 3, 4. So, the output should be [ 1, 2, 3, 4 ]

Sample Input 1

4

1

2

3

4

Sample Output 1

[1, 2, 3, 4]

Sample Input 2

3

13

21

19

Sample Output 2

[13, 21, 19]


can i get code without using append by using +operator



Given list sorting array and same frequency



Input:



[2 6 3 1 8 12 2 9 10 3 4]



Output:



[1 2 2 3 3 4 6 8 9 10 12]



2 3

Create and Print List -3:

You are given N numbers as input. Create a list and add the N numbers which are given as input and print the list.


Input:

The first line of input is an integer N. The next N lines each contain an integer.

Explanation:

In the given example,

N=4 and the numbers are 1, 2, 3, 4. So, the output should be [ 1, 2, 3, 4 ]

Sample Input 1

4

1

2

3

4

Sample Output 1

[1, 2, 3, 4]

Sample Input 2

3

13

21

19

Sample Output 2

[13, 21, 19]


can i get code without using append


Sanjay is recruited in Infosys company as a python developer. The company assigned him a software development task to build a compiler. Sanjay identifies that for compiler designing he need to implement tokenization of a specific line of program. As a friend of Sanjay, your task is to help him to write a python function Tokenize_Line(fname, n) (Refer RollNo_W11A_2.py )which reads nth line from prime.py file and returns a list containing all tokens of that line as shown in the example. Also, handle the possible exception and provide proper message.







Contents of prime.py file will be like:




from math import sqrt




n = 1




prime_flag = 0




if(n > 1):




for i in range(2, int(sqrt(n)) + 1):




if (n % i == 0):




prime_flag = 1




break




if (prime_flag == 0):




print("true")




else:




print("false")




else:




print("false")

You are given a file read.txt which contains some lines. As a python developer, you need to write a python function Read_Contents(fname, n) (Refer RollNo_W11A_1.py )which takes the name of the files and number of lines to be read from file. The function returns those lines in a string as shown in example.



Contents of read.txt file will be like:



This is python Lab.



The is the program for file handling.



Reading first n lines !

LATEST TUTORIALS
APPROVED BY CLIENTS