Lesson 29 of 34

Modules: math, random এবং আরও

8 min 30 XP

Python-এ শত শত তৈরি modules আছে। import দিয়ে সেগুলো ব্যবহার করুন। math module-এ অঙ্কের functions আছে।

Example: edit me and press Run

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

random module games, OTP আর quiz-এর জন্য কাজের। প্রতিবার Run চাপলে আলাদা উত্তর পাবেন!

Example: edit me and press Run

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

শুধু যা দরকার তা আনতে from ... import ব্যবহার করুন।

Example: edit me and press Run

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

Challenge

+30 XP

input() দিয়ে বৃত্তের ব্যাসার্ধ পড়ুন (দশমিক হতে পারে)। math.pi দিয়ে এর ক্ষেত্রফল (π × r × r) 2 দশমিক স্থানে round করে print করুন।

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