Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Function
#1
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
Reply
#2
What is done with the result?
Reply
#3
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.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

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


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020