Lesson 5 of 34

கணக்குகள்: Operators

7 min 20 XP

Python ஒரு சக்திவாய்ந்த calculator. / என்பது தசம வகுத்தல், // என்பது முழு எண் வகுத்தல், % என்பது மீதி (remainder), ** என்பது அடுக்கு (power).

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

கணிதத்தில் போலவே, * மற்றும் / முதலில் கணக்கிடப்படும், பிறகு + மற்றும் -. அடைப்புக்குறி ( ) முதலில் செய்ய வைக்கும்.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

ஒரு எண் இரட்டைப்படையா என்று பார்க்க: n % 2 என்பது 0 என்றால் இரட்டைப்படை.

Challenge

+20 XP

நீளம் length = 12, அகலம் width = 5 உள்ள செவ்வகத்தின் பரப்பளவு (area) மற்றும் சுற்றளவு (perimeter) இரண்டையும் தனித்தனி வரிகளில் print செய்யுங்கள்.

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.