Flow of Control || Type C || Sumita Arora || Class 11 || Information practices || Solution
Q1. Write a python script that ask the user to enter a length in centimeters .if the user enters a negative length , the program should tell the user that the entry is invalid . otherwise ,the program should convert the length to inches and print out the result . there are 2.54 centimeters in an inch.
Q2. A store charges RS 120 per item if you buy less than 10 items . if you buy between 10 and 99 items ,the cost is RS100 per item . if you buy more items , the cost is RS 70 the user how many items they are buying and print the total cost .
Q4. Write a program that reads from user -
(i) An hour between 1 to 12 and
(ii) Number of hours ahead. The program should then print the time after those many hours.
Q11. Write a program to input assets, liabilities and capital of a company and test if accounting equation holds true for the given value (i.e., balanced or not).
Q12. Write a program to input total debt and total assets and calculate total-debt-to-total-assets ratio (TD/TA) as Total Debt/Total Assets. Then print if the major portion of the debt is funded by assets (when TD/TA > 1) or greater portion of assets is funded by equity (when TD/TA < 1).
Q13. Write a program to calculate Debt-to-equity (D/E) ratio as
Total Liabilities after / Total shareholders' equity
after inputting total liabilities and total shareholders' equity. And then print if an investor should invest in the company or not. A D/E ratio greater than 2.0 indicates a risky scenario for an investor.
Q12. Write a program to input total debt and total assets and calculate total-debt-to-total-assets ratio (TD/TA) as Total Debt/Total Assets. Then print if the major portion of the debt is funded by assets (when TD/TA > 1) or greater portion of assets is funded by equity (when TD/TA < 1).
Q13. Write a program to calculate Debt-to-equity (D/E) ratio as
Total Liabilities after / Total shareholders' equity
after inputting total liabilities and total shareholders' equity. And then print if an investor should invest in the company or not. A D/E ratio greater than 2.0 indicates a risky scenario for an investor.
Q15. Write a program that inputs cost price and selling price for 10 items. The prints if the overall profit occurred or loss occurred.
Q16. Modify previous question so that the program now also prints profit/loss for individual items along with overall profit/loss.
Q16. Modify previous question so that the program now also prints profit/loss for individual items along with overall profit/loss.
Q18. Write programs using nested loops to produce the following pattern :
(i) A
A B
A B C
A B C D
A B C D E
A B C D E F
(ii) 0
22
444
8888
(i) A
A B
A B C
A B C D
A B C D E
A B C D E F
(ii) 0
22
444
8888
Q19. Write a program using nested loops to produce rectangle of *’s with 6 rows and 20 *’s per row .
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )