SlideShare a Scribd company logo
USE PYTHON ONLY USE DEF function. For number 68
Solution
#!/usr/bin/python
import sys
#Global variables
interest =0
montlyPayment =0
balance =0
interestPaidForMonth =0
reducOfPrincipal =0
eomBalance =0
# getInput Function definition is here
def getInput():
global interest, montlyPayment, balance;
interest = input("Enter annual rate of interest:")
montlyPayment= input(" Enter monthly payment:")
balance= input(" Enter beg. of month balance:")
interest = float(interest)
montlyPayment=float(montlyPayment)
balance=float(balance)
return;
# calculateOutput Function definition is here
def calculateOutput():
global interestPaidForMonth, reducOfPrincipal, eomBalance
interestPaidForMonth= ((balance*interest)/100)/12
reducOfPrincipal = montlyPayment-interestPaidForMonth
eomBalance = balance-reducOfPrincipal
return;
def showOutput():
print("Interest paid For the month:",round(interestPaidForMonth, 2))
print(" Reduction of principal:",round(reducOfPrincipal, 2))
print(" End of month balance:",round(eomBalance, 2))
def main():
getInput()
calculateOutput();
showOutput()
main()
#In the question the value of reduction of principal is given wrong
#Using python , call by reference is not possible

More Related Content

Similar to USE PYTHON ONLY USE DEF function. For number 68Solution#!.pdf

Operators expressions-and-statements
Operators expressions-and-statementsOperators expressions-and-statements
Operators expressions-and-statementsCtOlaf
 
Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8
Nikita Popov
 
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdfThe solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
aparnatiwari291
 
Learning C programming - from lynxbee.com
Learning C programming - from lynxbee.comLearning C programming - from lynxbee.com
Learning C programming - from lynxbee.com
Green Ecosystem
 
How to Create a l10n Payroll Structure
How to Create a l10n Payroll StructureHow to Create a l10n Payroll Structure
How to Create a l10n Payroll Structure
Odoo
 
Justin trimmer cop2000 5-week 2_super supermarket pay calculator
Justin trimmer cop2000 5-week 2_super supermarket pay calculatorJustin trimmer cop2000 5-week 2_super supermarket pay calculator
Justin trimmer cop2000 5-week 2_super supermarket pay calculatorWintur
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
amrit47
 
Slides13.pdf
Slides13.pdfSlides13.pdf
Slides13.pdf
ssuser3b4934
 
Lecture 14 - Scope Rules
Lecture 14 - Scope RulesLecture 14 - Scope Rules
Lecture 14 - Scope Rules
Md. Imran Hossain Showrov
 
C語言運算式和運算子
C語言運算式和運算子C語言運算式和運算子
C語言運算式和運算子
吳錫修 (ShyiShiou Wu)
 
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docxCompute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
mccormicknadine86
 
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docxCompute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
patricke8
 
Wii Ruby All Work And No Play Just Wont Do
Wii Ruby All Work And No Play Just Wont DoWii Ruby All Work And No Play Just Wont Do
Wii Ruby All Work And No Play Just Wont DoLittleBIGRuby
 
Intro to c programming
Intro to c programmingIntro to c programming
Intro to c programming
Prabhu Govind
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdf
rajeshjangid1865
 
Programming Global variable
Programming Global variableProgramming Global variable
Programming Global variable
imtiazalijoono
 

Similar to USE PYTHON ONLY USE DEF function. For number 68Solution#!.pdf (18)

Operators expressions-and-statements
Operators expressions-and-statementsOperators expressions-and-statements
Operators expressions-and-statements
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
 
Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8
 
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdfThe solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
 
Learning C programming - from lynxbee.com
Learning C programming - from lynxbee.comLearning C programming - from lynxbee.com
Learning C programming - from lynxbee.com
 
How to Create a l10n Payroll Structure
How to Create a l10n Payroll StructureHow to Create a l10n Payroll Structure
How to Create a l10n Payroll Structure
 
Justin trimmer cop2000 5-week 2_super supermarket pay calculator
Justin trimmer cop2000 5-week 2_super supermarket pay calculatorJustin trimmer cop2000 5-week 2_super supermarket pay calculator
Justin trimmer cop2000 5-week 2_super supermarket pay calculator
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
 
Slides13.pdf
Slides13.pdfSlides13.pdf
Slides13.pdf
 
ICP - Lecture 5
ICP - Lecture 5ICP - Lecture 5
ICP - Lecture 5
 
Lecture 14 - Scope Rules
Lecture 14 - Scope RulesLecture 14 - Scope Rules
Lecture 14 - Scope Rules
 
C語言運算式和運算子
C語言運算式和運算子C語言運算式和運算子
C語言運算式和運算子
 
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docxCompute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
 
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docxCompute IRR and NPV in Microsoft Excel 1.IRR Function .docx
Compute IRR and NPV in Microsoft Excel 1.IRR Function .docx
 
Wii Ruby All Work And No Play Just Wont Do
Wii Ruby All Work And No Play Just Wont DoWii Ruby All Work And No Play Just Wont Do
Wii Ruby All Work And No Play Just Wont Do
 
Intro to c programming
Intro to c programmingIntro to c programming
Intro to c programming
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdf
 
Programming Global variable
Programming Global variableProgramming Global variable
Programming Global variable
 

More from lohithkart

International business1. What is the current status of Pakistan in.pdf
International business1. What is the current status of Pakistan in.pdfInternational business1. What is the current status of Pakistan in.pdf
International business1. What is the current status of Pakistan in.pdf
lohithkart
 
Imagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdf
Imagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdfImagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdf
Imagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdf
lohithkart
 
In 2017, Jasmine and Thomas, a married couple, had taxable income of.pdf
In 2017, Jasmine and Thomas, a married couple, had taxable income of.pdfIn 2017, Jasmine and Thomas, a married couple, had taxable income of.pdf
In 2017, Jasmine and Thomas, a married couple, had taxable income of.pdf
lohithkart
 
In a maternity ward, four babies become accidentally mixed up. The AB.pdf
In a maternity ward, four babies become accidentally mixed up. The AB.pdfIn a maternity ward, four babies become accidentally mixed up. The AB.pdf
In a maternity ward, four babies become accidentally mixed up. The AB.pdf
lohithkart
 
How has the social change driven the development of new information .pdf
How has the social change driven the development of new information .pdfHow has the social change driven the development of new information .pdf
How has the social change driven the development of new information .pdf
lohithkart
 
HIV protease activates waterfor a hydrolysis reactions using what ty.pdf
HIV protease activates waterfor a hydrolysis reactions using what ty.pdfHIV protease activates waterfor a hydrolysis reactions using what ty.pdf
HIV protease activates waterfor a hydrolysis reactions using what ty.pdf
lohithkart
 
Fair Value and Equity Methods Conceptual Questions1. What are the .pdf
Fair Value and Equity Methods Conceptual Questions1. What are the .pdfFair Value and Equity Methods Conceptual Questions1. What are the .pdf
Fair Value and Equity Methods Conceptual Questions1. What are the .pdf
lohithkart
 
Do larval and adult lampreys have the 5 chordate characteristics Wh.pdf
Do larval and adult lampreys have the 5 chordate characteristics  Wh.pdfDo larval and adult lampreys have the 5 chordate characteristics  Wh.pdf
Do larval and adult lampreys have the 5 chordate characteristics Wh.pdf
lohithkart
 
Describe and explain how sound travels in each Solids Liquids G.pdf
Describe and explain how sound travels in each  Solids  Liquids  G.pdfDescribe and explain how sound travels in each  Solids  Liquids  G.pdf
Describe and explain how sound travels in each Solids Liquids G.pdf
lohithkart
 
Contrast apomixis with sexual reproduction in flowering plantsSo.pdf
Contrast apomixis with sexual reproduction in flowering plantsSo.pdfContrast apomixis with sexual reproduction in flowering plantsSo.pdf
Contrast apomixis with sexual reproduction in flowering plantsSo.pdf
lohithkart
 
Before dawn Josh hurriedly packed some clothes for a job-interview t.pdf
Before dawn Josh hurriedly packed some clothes for a job-interview t.pdfBefore dawn Josh hurriedly packed some clothes for a job-interview t.pdf
Before dawn Josh hurriedly packed some clothes for a job-interview t.pdf
lohithkart
 
5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf
5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf
5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf
lohithkart
 
8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf
8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf
8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf
lohithkart
 
Write a program that moves the ball in a pane. You should define a pa.pdf
Write a program that moves the ball in a pane. You should define a pa.pdfWrite a program that moves the ball in a pane. You should define a pa.pdf
Write a program that moves the ball in a pane. You should define a pa.pdf
lohithkart
 
1. Answer the following questions about OSI modela.At which layer.pdf
1. Answer the following questions about OSI modela.At which layer.pdf1. Answer the following questions about OSI modela.At which layer.pdf
1. Answer the following questions about OSI modela.At which layer.pdf
lohithkart
 
17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf
17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf
17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf
lohithkart
 
When a researcher is working with a large set of scale data, whic.pdf
When a researcher is working with a large set of scale data, whic.pdfWhen a researcher is working with a large set of scale data, whic.pdf
When a researcher is working with a large set of scale data, whic.pdf
lohithkart
 
Which functions of the lymphatic system are not assisted by another s.pdf
Which functions of the lymphatic system are not assisted by another s.pdfWhich functions of the lymphatic system are not assisted by another s.pdf
Which functions of the lymphatic system are not assisted by another s.pdf
lohithkart
 
The symbiotic relationship in which the symbiotic benefits from the r.pdf
The symbiotic relationship in which the symbiotic benefits from the r.pdfThe symbiotic relationship in which the symbiotic benefits from the r.pdf
The symbiotic relationship in which the symbiotic benefits from the r.pdf
lohithkart
 
What are brain ventricles. and what functions have been ascribed to t.pdf
What are brain ventricles. and what functions have been ascribed to t.pdfWhat are brain ventricles. and what functions have been ascribed to t.pdf
What are brain ventricles. and what functions have been ascribed to t.pdf
lohithkart
 

More from lohithkart (20)

International business1. What is the current status of Pakistan in.pdf
International business1. What is the current status of Pakistan in.pdfInternational business1. What is the current status of Pakistan in.pdf
International business1. What is the current status of Pakistan in.pdf
 
Imagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdf
Imagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdfImagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdf
Imagine a polygon (not necessarily convex) with 2015 sides. Suppose .pdf
 
In 2017, Jasmine and Thomas, a married couple, had taxable income of.pdf
In 2017, Jasmine and Thomas, a married couple, had taxable income of.pdfIn 2017, Jasmine and Thomas, a married couple, had taxable income of.pdf
In 2017, Jasmine and Thomas, a married couple, had taxable income of.pdf
 
In a maternity ward, four babies become accidentally mixed up. The AB.pdf
In a maternity ward, four babies become accidentally mixed up. The AB.pdfIn a maternity ward, four babies become accidentally mixed up. The AB.pdf
In a maternity ward, four babies become accidentally mixed up. The AB.pdf
 
How has the social change driven the development of new information .pdf
How has the social change driven the development of new information .pdfHow has the social change driven the development of new information .pdf
How has the social change driven the development of new information .pdf
 
HIV protease activates waterfor a hydrolysis reactions using what ty.pdf
HIV protease activates waterfor a hydrolysis reactions using what ty.pdfHIV protease activates waterfor a hydrolysis reactions using what ty.pdf
HIV protease activates waterfor a hydrolysis reactions using what ty.pdf
 
Fair Value and Equity Methods Conceptual Questions1. What are the .pdf
Fair Value and Equity Methods Conceptual Questions1. What are the .pdfFair Value and Equity Methods Conceptual Questions1. What are the .pdf
Fair Value and Equity Methods Conceptual Questions1. What are the .pdf
 
Do larval and adult lampreys have the 5 chordate characteristics Wh.pdf
Do larval and adult lampreys have the 5 chordate characteristics  Wh.pdfDo larval and adult lampreys have the 5 chordate characteristics  Wh.pdf
Do larval and adult lampreys have the 5 chordate characteristics Wh.pdf
 
Describe and explain how sound travels in each Solids Liquids G.pdf
Describe and explain how sound travels in each  Solids  Liquids  G.pdfDescribe and explain how sound travels in each  Solids  Liquids  G.pdf
Describe and explain how sound travels in each Solids Liquids G.pdf
 
Contrast apomixis with sexual reproduction in flowering plantsSo.pdf
Contrast apomixis with sexual reproduction in flowering plantsSo.pdfContrast apomixis with sexual reproduction in flowering plantsSo.pdf
Contrast apomixis with sexual reproduction in flowering plantsSo.pdf
 
Before dawn Josh hurriedly packed some clothes for a job-interview t.pdf
Before dawn Josh hurriedly packed some clothes for a job-interview t.pdfBefore dawn Josh hurriedly packed some clothes for a job-interview t.pdf
Before dawn Josh hurriedly packed some clothes for a job-interview t.pdf
 
5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf
5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf
5. A child’s toy oven uses an incandescent light bulb to bake cookie.pdf
 
8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf
8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf
8. Upon reviewing former CEO Jeff Swartz’s final blog post, do you a.pdf
 
Write a program that moves the ball in a pane. You should define a pa.pdf
Write a program that moves the ball in a pane. You should define a pa.pdfWrite a program that moves the ball in a pane. You should define a pa.pdf
Write a program that moves the ball in a pane. You should define a pa.pdf
 
1. Answer the following questions about OSI modela.At which layer.pdf
1. Answer the following questions about OSI modela.At which layer.pdf1. Answer the following questions about OSI modela.At which layer.pdf
1. Answer the following questions about OSI modela.At which layer.pdf
 
17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf
17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf
17. Of these, which represents a heterozygote a. aa b. Aa c. .pdf
 
When a researcher is working with a large set of scale data, whic.pdf
When a researcher is working with a large set of scale data, whic.pdfWhen a researcher is working with a large set of scale data, whic.pdf
When a researcher is working with a large set of scale data, whic.pdf
 
Which functions of the lymphatic system are not assisted by another s.pdf
Which functions of the lymphatic system are not assisted by another s.pdfWhich functions of the lymphatic system are not assisted by another s.pdf
Which functions of the lymphatic system are not assisted by another s.pdf
 
The symbiotic relationship in which the symbiotic benefits from the r.pdf
The symbiotic relationship in which the symbiotic benefits from the r.pdfThe symbiotic relationship in which the symbiotic benefits from the r.pdf
The symbiotic relationship in which the symbiotic benefits from the r.pdf
 
What are brain ventricles. and what functions have been ascribed to t.pdf
What are brain ventricles. and what functions have been ascribed to t.pdfWhat are brain ventricles. and what functions have been ascribed to t.pdf
What are brain ventricles. and what functions have been ascribed to t.pdf
 

Recently uploaded

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 

USE PYTHON ONLY USE DEF function. For number 68Solution#!.pdf

  • 1. USE PYTHON ONLY USE DEF function. For number 68 Solution #!/usr/bin/python import sys #Global variables interest =0 montlyPayment =0 balance =0 interestPaidForMonth =0 reducOfPrincipal =0 eomBalance =0 # getInput Function definition is here def getInput(): global interest, montlyPayment, balance; interest = input("Enter annual rate of interest:") montlyPayment= input(" Enter monthly payment:") balance= input(" Enter beg. of month balance:") interest = float(interest) montlyPayment=float(montlyPayment) balance=float(balance) return; # calculateOutput Function definition is here def calculateOutput(): global interestPaidForMonth, reducOfPrincipal, eomBalance interestPaidForMonth= ((balance*interest)/100)/12 reducOfPrincipal = montlyPayment-interestPaidForMonth eomBalance = balance-reducOfPrincipal return; def showOutput(): print("Interest paid For the month:",round(interestPaidForMonth, 2))
  • 2. print(" Reduction of principal:",round(reducOfPrincipal, 2)) print(" End of month balance:",round(eomBalance, 2)) def main(): getInput() calculateOutput(); showOutput() main() #In the question the value of reduction of principal is given wrong #Using python , call by reference is not possible