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

Indivisible Numbers


This Program name is Indivisible Numbers. Write a Python program to Indivisible Numbers


The below link contains Indivisible Numbers question, explanation and test cases


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


We need exact output when the code was run

Pythagoras Triplets


This Program name is Pythagoras Triplets. Write a Python program to Pythagoras Triplets


The below link contains Pythagoras Triplets question, explanation and test cases


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


We need exact output when the code was run

Write a program that determines whether you can run for president. To run for president the constitution states: No Person except a natural born Citizen, or a Citizen of the South Africa(SA), at the time of the Adoption of this Constitution, shall be eligible to the Office of President; neither shall any Person be eligible to that Office who shall not have attained to the Age of thirty five Years, and been fourteen Years a Resident within the South Africa. Ask three questions of the user and use the guess and check pattern to determine if they are eligible to run for President. 


given a list of integers , write a program to print the count of all possible unique combinations of numbers whose sum is equal to k.


Write a Python program that reads in an integer and then displays the digits in that integer in reverse order


Write a Python program that reads in exam results from the user. The program should then display the number of students who achieved more than 70% in their exam. Assume that the first value read in specifies the number of exam results that are to be entered.


Masking - 2

Write a program that reads a single line of input and prints the first two and last two characters of the given input and prints the asterisk character (*) in place of the remaining characters.

Explanation

For example, if the given string is 

message, then the first two and last two characters are me, ge. Now replacing all the remaining characters with * will give the output me***ge.

Sample Input 1
message
Sample Output 1
me***ge
Sample Input 2
12345
Sample Output 2
12*45

M = int(input())
P = int(input())
C = int(input())
list1 = [M,P,C]
list2 = []
for i in list1:
  list1.remove(i)
  for j in list1:
    if i + j >= 100 and M + P + C >= 180:
      list2.append(True)
    else:
      list2.append(False)
if False in list2:
  print(False)
else:
  print(True)

The Above code have three test cases, but they were getting only two test cases as expected output, third test case were not getting expected output.

Question url link :- https://drive.google.com/file/d/1xObf_3zdyEfD8yEtB5V4OqL6HVzEd7h1/view?usp=sharing

The test cases are below

Test Case – 1

Input

82

55

45

Output

True

 

Test Case – 2

Input

71

30

70

Output

False

Test Case – 3

Input

40

90

50

Output

True


Years, Weeks & Days

Given 

N number of days as input, write a program to convert N number of days to years (Y), weeks (W) and days (D).

Note: Take 1 year = 365 days.

Input

The input contains single integer 

N.

Output

Print space-separated integers 

Y, W and D.

Explanation

Given  

N = 1329. The value can be written as

1329 = 3 years + 33 weeks + 3 days

So the output should be 

3 33 3.

Sample Input 1
1329
Sample Output 1
3
33
3
Sample Input 2
0
Sample Output 2
0
0
0
Elements in the Range

You are given three numbers. Check if any of the numbers exist in the range from 10 to 20 (including 10 and 20).

Input

The first, second, and third lines of input are integers.

Output

The output should be either 

True or False.

Explanation

Given 

a = 2, b = 4, c = 16, 16 is in the range between 10 and 20.

So the output should be 

True.

Sample Input 1
2
4
16
Sample Output 1
True
Sample Input 2
2
4
6
Sample Output 2
False

LATEST TUTORIALS
APPROVED BY CLIENTS