Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Bitnami MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
3207 - Cercuri
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Explicatie== Acest cod contine doua functii, 'validare' si 'puncte_cercuri', si un bloc 'if' care citeste datele de intrare si apeleaza cele doua functii. Functia 'validare' verifica daca datele de intrare corespund anumitor restrictii. Aceasta accepta 6 argumente, care sunt razele si coordonatele a doua cercuri si returneaza True daca acestea se afla in intervalul permis (r1, r2 intre 0 si 100000, x1, y1, x2, y2 intre -10000 si 10000), altfel returneaza False. Functia 'puncte_cercuri' calculeaza numarul de puncte de intersectie dintre cele doua cercuri, sau mesajul "infinit" daca cele doua cercuri sunt identice si se suprapun. Aceasta accepta aceleasi 6 argumente ca si functia 'validare'. Calculeaza distanta dintre centrul cercurilor si verifica daca sunt doua, una sau zero puncte de intersectie. Rezultatul este afisat prin intermediul instructiunii 'print'. Blocul 'if' citeste datele de intrare de la utilizator pentru cele doua cercuri si verifica daca acestea sunt valide apeland functia 'validare'. Daca datele de intrare sunt valide, afiseaza un mesaj corespunzator si calculeaza numarul de puncte de intersectie apeland functia 'puncte_cercuri'. Daca datele de intrare nu sunt valide, afiseaza un alt mesaj corespunzator.
Summary:
Please note that all contributions to Bitnami MediaWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Bitnami MediaWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width