Python Forum
Python Function - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Python Function (/thread-30825.html)



Python Function - zee - Nov-08-2020

Write a program having a void function that receives a 4 - digit number and calculates the sum of square of the first two digits and last two digits .
Eg if 1233 is passed as argument then the function should calculate 12 square + 33 square


RE: Python Function - deanhystad - Nov-08-2020

What is done with the result?


RE: Python Function - buran - Nov-08-2020

what have you tried? we are glad to help, but we are not going to do your homework for you. Show your code, full traceback (if you get any errors), ask specific questions.
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.


RE: Python Function - zee - Nov-09-2020

I tried it and it worked ! Thank you fro replying:)