Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
How do you use functions in py3?
+7
votes
asked
Sep 19, 2022
by
Komla Sedzro
(
200
points)
I need help with functions in py3
python-3
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
4 Answers
0
votes
answered
Sep 19, 2022
by
Peter Minarik
(
79,800
points)
Please, check out
this tutorial
on Python functions.
Good luck!
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Sep 21, 2022
by
Dnayneshwar Chakotkar
(
140
points)
you have to define the function in python by using the def keyword of python then function name and the void for defining the function.
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
+1
vote
answered
Sep 21, 2022
by
codenxn
(
1,330
points)
def functionName(arguments):
*your code here*
functionName()
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Sep 24, 2022
by
Pradeep Pant
(
180
points)
def function_name(argument if any): # function definition starts with keyword def
body of funtion
function( value of argument if any ) #function call
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...