Python 3.2 how to call a function into another?
-
def sigmageo(): ...print("geometric sigma") ...print(""" ... ...Sn = G1(1-r^n) ... .............--------- ... ...............1-r ...""" ... ..) ...r1 = float(input("common ratio: ")) ...gn = float(input("# of terms adding or the term you want to figure out the value of: ")) ...g1 = float(input("First term: ")) ...a = (g1*(1-pow(r1, gn)))/(1-(r1)) ...print("the",gn,"term you wanted = ",a) ...input("") def geometseq(): ...print("geometric sequence") ...print(""" ... ...Gn = G1 * r^(n-1) ...""" ...) ...Gn = float(input("the term you want the value of: ")) ...G1 = float(input("the first term: ")) ...r2 = float(input("common ratio: ")) ...n = Gn ...Gn = G1 * pow(r2, n-1) ...print(n,"is equal to",Gn) ------------------ how do i call the bottom function into the top function? and how do i call functions into other functions in general??
-
Answer:
post this code to somewhere it is readable like codepad or pastebin. All the periods are making it confusing to read. I know they mean tabs and I can find the tabs, but this is nearly unreadable. Also, I don't see where you call either function from the other.
Jared Garrow at Yahoo! Answers Visit the source
Other answers
post this code to somewhere it is readable like codepad or pastebin. All the periods are making it confusing to read. I know they mean tabs and I can find the tabs, but this is nearly unreadable. Also, I don't see where you call either function from the other.
Jared
Related Q & A:
- How to call a popup from a link inside another popup?Best solution by stackoverflow.com
- How to call jQuery function with multiple parameters?Best solution by Stack Overflow
- How to call a function with parameter in a bash script?Best solution by tldp.org
- how to call a function in Python in another function?Best solution by Yahoo! Answers
- How to call a function asynchronously in PHP?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.