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

s = input()
s = s.lower()
s2 = s.split()
s3 = ''.join(s2)
if s3 == s3[::-1]:
 print("True")
else:
 print("False")

In this python program it has three test cases, in this three test cases two test cases are getting expected output and third test case are not getting expected output. Please give me expexted output for three test cases. Thank you !

Question url :-

https://drive.google.com/file/d/1ZELb2KSvV36MM4kiF-dTFTC43CeUiFH9/view?usp=sharing

Test case - 1

Input

No lemon no melon

Output

True

 

Test case - 2

Input

Race Cars

Output

False

 

Test case - 3

Input

God’s Dog

Output

True


num = int(input())
if num > 1:
  for i in range(2, int(num/2)+1):
    if (num % i) == 0:
      print(True)
      break
  else:
    print(False)
  
else:
  print(True)

In this python program it has three test cases, in this three test cases two test cases are getting expected output and third test case are not getting expected output. Please give me expexted output for three test cases. Thank you !

Question url :-

https://drive.google.com/file/d/1XrSRAXys8kKSTYMSm58aED455XD_i4tm/view?usp=sharing


Test case - 1 

Input

12

Output

True

 

Test case - 2

Input

3

Output

False

 

Test case - 3

Input

1

Output

False


List Indexing - 3

Given N numbers, and an index, write a program to store the numbers in a list and print the number at given index. For this problem, each input will contain T test cases. Each test case will give an index Ki as input, which should be considered to print the number.

Input:

The first line of input is an integer N. The second line of input is an integer T representing the number of test cases. The next N lines contain integers representing the numbers of the list. The next T lines contain integer Ki for each line.

Output:

You need to print a number in a new line for each of the K test cases.

Explanation:

In the given example, we are given

4 numbers 1, 2, 3, 4 as input For the first test case, K=0, the number at 0th index is 1. For the second test case, K=3, the number at 3rd index is 4. So, the output should be

1

4


Sample Input 1

4

2

1

2

3

4


3

Sample Output 1

1

4

Sample Input 2

3

1

13

21

19


Sample Output 2

13




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]




Acronyms:

You are given some abbreviations as input. Write a program to print the acronyms separated by a dot(.) of those abbreviations.

Input:

The first line of input contains space-separated strings.

Explanation:

Consider the given abbreviation,

Indian Administrative Service. We need to consider the first character in each of the words to get the acronym. We get the letter I from the first string Indian, we get the letter A from the second word Administrative, and we get the letter S from the third word Service. So, the final output should be I.A.S.

Sample Input 1:

Indian Administrative Service

Sample Output 1:

I.A.S

Sample Input 2:

Very Important Person

Sample Output 2:

V.I.P




Largest Number in the List:

You are given space-separated integers as input. Write a program to print the maximum number among the given numbers.

Input:

The first line of input contains space-separated integers.

Explanation:

In the example, the integers given are

1, 0, 3, 2, 9, 8. The maximum number present among them is 9. So, the output should be 9.

Sample Input 1:

1 0 3 2 9 8

Sample Output 1:

9

Sample Input 2:

-1 -3 -4 0

Sample Output 2:





W pattern with *


This Program name is W pattern with *. Write a Python program to W pattern with *, it has two test cases


The below link contains W pattern with * question, explanation and test cases


https://drive.google.com/file/d/1gcmmsSrPkGTY3aHoyGuw-x3qFFFnLTeb/view?usp=sharing


We need exact output when the code was run

Armstrong numbers between two intervals


This Program name is Armstrong numbers between two intervals. Write a Python program to Armstrong numbers between two intervals, it has two test cases


The below link contains Armstrong numbers between two intervals question, explanation and test cases


https://drive.google.com/file/d/1nMwnGgwxLey1JhQEaQ_x-goS5_1DyVdL/view?usp=sharing


We need exact output when the code was run

Pyramid


This Program name is Pyramid. Write a Python program to Pyramid, it has two test cases


The below link contains Pyramid question, explanation and test cases


https://drive.google.com/file/d/1KwCeEpWf99Y31ax5lohTDxrL4226ZzIJ/view?usp=sharing


We need exact output when the code was run

Digit 9


This Program name is Digit 9. Write a Python program to Digit 9, it has two test cases


The below link contains Digit 9 question, explanation and test cases


https://drive.google.com/file/d/1lqixEtNT6DnFGtmFoJLzQrmvYowmxNqi/view?usp=sharing


We need exact output when the code was run

LATEST TUTORIALS
APPROVED BY CLIENTS