Asked by MagistrateBadgerPerson682
Using Python Language Topic: Iterations - Use of While...
Using Python Language
Topic: Iterations - Use of While Statements
Deliverables:
- Complete source code of the program.
- With comments inside the source code for better understanding of the flow.
- Screenshots of the running output.
Instructions:
This problem set focuses on using iterations -- specifically, the use of while statements in Python. Read the problems below and produce an algorithm that acts as the solution. Some problems require you to answer the question manually, then implement a more general form of the question. Kindly practice using decomposition in tackling problems you're having trouble with.
Some questions clearly state the input and the output/goal of the problem. In those cases, your task would be to understand how to transform input to output. For other problems, you'll have to identify the appropriate input based the situation stated.
NOTE: As this completes the different programming concepts in our syllabus, consider revisiting previous problem sets and look for problems that might benefit from using loops.
Set Problems:
1. Provide a Python script that, given some integers x and y as input, outputs the product between x and y. For this question, you are not allowed to use the *** operator.
2. You want to save money for your college graduation trip so you decide to open up a bank account. Provide a program that will ask for the initial balance, the interest rate of the bank (assume that this is between 2.0-5.0% per year) and the target balance. Display how long it would take to get from the initial balance to the target balance. Calculation for the growth is the balance (1 + interest). See sample output below:
Sample Output for number 2:
Image transcription text
Initial: 1000 Interest: 0.03 Target: 1200 Year 0 : 1000.0 Year 1 : 1030.0 Year 2 : 1060.9 Year 3 : 1092.73 Year 4 : 1125 .51 Year 5 : 1159.28 Year 6 : 1194.06 Year 7 : 1229.88
Answered by NIMITSHRESTHA2
Unlock full access to Course Hero
Explore over 16 million step-by-step answers from our library
Subscribe to view answerstie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor si
gue
tesque dap
amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consect
gue
ur laoreet. Nam risus an
amet, conse
at, ulrem ipsum dolor sit amet, consectet
gue
at, ultfacilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, d
gue
tricesiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam
gue
ng elit.e vel laoreet ac, dictum vit
gue
ng elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque
ipsum dolor
gue
tesque dap