write a program code thathas two functions: first() and second(). Function first() should print the string "in function first()" and then call function second()> functions second() should print the string "in function second()". in the global scope, you should call function first.
bretthay93
0
Newbie Poster
Recommended Answers
Jump to PostC'mon, show a little effort. It's not hard, I promise.
Jump to PostTo call a function you simply type its name and a pair of parenthesis. Between the parenthesis is where you'll supply any parameters the function takes.
Replace line 6 with:
first("any text here")
Consider redoing your code a little bit. It's a little confusing and it will not do …
Jump to Postglobal scope lines are top-level lines outside the functions without indentation like line 6 in your code.
All 12 Replies
WildBamaBoy
19
Junior Poster
bretthay93
0
Newbie Poster
WildBamaBoy
19
Junior Poster
bretthay93
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
bretthay93
0
Newbie Poster
WildBamaBoy
19
Junior Poster
bretthay93
0
Newbie Poster
WildBamaBoy
19
Junior Poster
bretthay93
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
WildBamaBoy
19
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.