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

Develop a Python application which will accept n non-negative integers and will display the DIVISORS of each number then will determine the COMMON DIVISORS of the input integers.



Sample Output:



How many numbers? 4

Input Number 1: 10

Input Number 2: 50

Input Number 3: 15

Input Number 4: 20


Divisors

10: 1 2 5 10

50: 1 2 5 25 10 50

15: 1 3 5 15

20: 1 2 5 10 20


COMMON Divisors is/are: 1 5


I need the code to have an output stated above.


Develop a Python application that will randomly select n integers from 1 to 45 without repetitions.


Sample Output:


How many numbers? 6

6 randomly selected nos.

[33, 13, 24, 22, 38, 34]



I need the code to have an output stated above.


Develop a Python application that will accept two non-negative integers and store them in a list and will append ten additional values equivalent to the sum of the two previous elements of the list.


Sample Output:


First Number: 1

Second Number: 3

[1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322]



I need the code to have an output stated above.


You’re working on a search engine. Watch your back Google!



The given code takes a text and a word as input and passes them to a function called search().



The search() function should return "Word found" if the word is present in the text, or "Word not found", if it’s not.



Sample Input


"This is awesome"


"awesome"



Sample Output


Word found

Develop a Python application that will randomly select n integers from 1 to 45 without repetitions.


Sample Output 1:


How many numbers? 6 6 randomly selected nos. [21, 35, 16, 36, 5, 8]

Develop a Python application that will accept two non-negative integers and store them in a list and will append ten additional values equivalent to the sum of the two previous elements of the list.

Sample Output:

First Number: 1

Second Number: 3

[1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322]


A teacher in a class with N students has noticed that some students have formed their own groups and hence prevented intermingling of students to get those students to mix with each other, the teacher has decided a seating pattern.The seating pattern is very simplistic viz. every boy should sit next to a girl and every girl should next to a boy. They are all seated in one line. It is also mandatory that no two boys sit together, and no two girls sit together. Your task is to make the above happen with minimum number of swaps between as-is situation to desired solution


ATM PIN Code Validation


Write a function with the name validate atm.pin code that takes a word as an argument. ATM PIN is considered valid only if the given word contains Exactly 4 or 6 characters - All the characters should be digits.


Input


The input will be a single line containing a string.


Output


The output should be a single line containing either "Valid PIN Code or "Invalid PIN Code".


Explanation


For example, if the given word is "9837". the output should be "Valid PIN Code", as it contains exactly four characters and all the characters are digits.


Whereas, if the given word is "A289h4", the output should be "invalid PIN Code, though the given word contains exactly six characters, all the characters are not digits.


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 contain single line integer N .


output

print space-separated integers Y , W and D.


Explanation

Given N =1329 . th 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 1



sample output 1





Women population


in a town, the percentage of men is 52 and the rest are women ( W ).the total population ( T ) of town is given as input.

write a program to print the total number of women in the town.


Input

the first line of input is an integer T .


output

the output should be an integer representing the total number of women in the town.


explanation

given total population 80000 . then the number of women should 80000*48/100=38400

so the output should be 38400 .


sample input 1

80000


sample output 1

38400


sample input 2

100000


sample output 1

48000


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS