Ask your own question, for FREE!
Computer Science 8 Online
kekeman:

Help Which of the following is an example of a subroutine? def pretty_print(x): print("++++", x, "++++") if x > 0: s = ( "pos") elif x < 0: s = ("neg") input("Enter your name: ") return s

SmokeyBrown:

As I understand it, the term "subroutine" is interchangeable with "function" or "method". And the only fully defined method is the first option, although the other options do form instructions that would be part of a function/subroutine/method. So, I would go with the first option for this one

kekeman:

Ok it says from my lessons Every time you define a new function, it is considered a subroutine.

kekeman:

So i agree!

SmokeyBrown:

Nice :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!