InfyTQ Coding Questions Set 3
InfyTQ Coding Questions Set 3
Sample Testcases
Testcase 1 Input Testcase 1 Output
44
Sample Testcases
Testcase 1 input Testcase 7 Output
Welcome to Python Programming
This video is sole property of Talent Battle Pvt. Ltd. Strict penal action will be taken against unauthorized piracy of this video
7) Total Expenses for the Event
The prime functionality of an Event Management System is budgeting. An Event
Management System should estimate the total expenses incurred by an event
and the percentage rate of each of the expenses involved in planning and executing
an event. Nikhil, the founder of "Pine Tree” wanted to include this functionality in his
company's Pine axe Event Management System and requested your help in writing a program
for the same. The program should get the branding expenses, travel expenses, food expenses
and logistics expenses as input from the user and calculate the total expenses for an event and
the percentage rate of each of these expenses.
Input Format
First input is a double value that corresponds to the branding expenses.
Second input is a double value that corresponds to the travel expenses.
Third input is a double value that corresponds to the food expenses.
Fourth input is a double value that corresponds to the logistics expenses.
Output Format
First line of the output should display the double value that corresponds to the total expenses
for the Event.
Next four lines should display the percentage rate of each of the expenses.
Refer to sample input and output for formatting specifications.
Constraints
Use format function to display the decimal values rounded off up to two decimal
places.
Sample Testcases
Testcase 1 Input Testcase 1 Output
20000 100000.00
40000 20.00%
15000 40.00%
25000 15.00%
25.00%
Testcase 2 Input Testcase 2 Output
20001 100021.00
40005 20.00%
15009 40.00%
25006 15.01%
25.00%
Video Solution Link : https://youtu.be/UzUYTYEWmfo
This video is sole property of Talent Battle Pvt. Ltd. Strict penal action will be taken against unauthorized piracy of this video
8) Given 2 integers N and M, add both the numbers and check whether the sum is
odd or even.
Input Format
First-line contains integer 1
Second-line contains integer 2
Output Format
Output describes weather the condition provided in the problem satisfies or not.
Sample Testcases
Testcase 1 Input Testcase 1 Output
9 odd
2
Testcase 2 Input Testcase 2 Output
10 even
2