প্রিয় বন্ধুগন, আজ আবার ফিরে আসলাম আপনাদের মাঝে । তবে, আজ আমি খুব বেশী আলোচনা করব না । শুধু একাটি বিষয়ের উপর আপনাদের ধারণা দিয়ে পূর্বের বিষয় গুলো আরও ক্লিয়ার করব । আজ আমরা যে বিষয় নিয়ে আলোচনা করব সেটা হল পাইথন কমেন্ট । এটা কি, কেন ব্যবহার করতে হবে , কিভাবে ।
পাইথন কমেন্ট : আপনি যখন কোন প্রোগ্রাম লিখবেন তখন সেটা আপনার মনে থাকবে যে কোথায় কী লিখেছেন । কিন্তু যদি কখনও সে প্রোগ্রামটা এডিট করার দরকার হয় তখন তো আপনার সব মনে নাও থাকতে পারে । আর এ গুলো মনে রাখার জন্যই রয়েছে পাইথন কমেন্ট । পাইথন কমেন্ট হল কোন স্টেটমেন্ট বা প্রোগ্রাম এর আগে তার প্রকৃতি , কাজ প্রভৃতি লিখে রাখা । এটা লেখার নিয়ম হল লাইনটি লেখার আগে একটা # চিহ্ন ব্যবহার করা । # চিহ্ন থাকলে পাইথন এটাকে কোন প্রোগ্রাম হিসেবে গণ্য করবে না বা ওর দিকে কোন মাথা ঘামাবে না । নিচে উদাহরণ দিলে বিষয়টা আরও ক্লিয়ার হবে :
# This program will calculate the area of a rectangle print(" Do you want to calculate a rectangle's area? input the length and width of that rectangle in numbers ") length = float(input("Enter the length : ")) width = float(input("enter the width : ")) print("area = ", length * width)) input("please give your feedback : ")
প্রোগ্রামটি রান করে দেখুন # চিহ্নের পরের অংশটুকু কোন কাজে লাগে নি । এটা দ্বারা শুধু আমি বুঝিয়েছি প্রোগ্রাম টা কী ধরণের । এবং সেটা শুধু আমার জন্য ।যে ব্যাক্তি প্রোগ্রাম টা ব্যবহার করবে তার জন্য নয় । দেখুন # এর পরের অংশটি লাল দেখা যাচ্ছে ।
এ প্রোগ্রাম টা দ্বারা আমরা একটি আয়তক্ষেত্রের ক্ষেত্রফল বের করছি । কমেন্টে পর আমরা ব্যবহার কারীকে প্রিন্ট এর মাধ্যমে বলেছি যে আপনি প্রোগ্রামটার মাধ্যমে একটি আয়তক্ষেত্রের ক্ষেত্রফল বের করতে পারবেন । আপনি সেটা করতে ইচ্ছুক হলে নীচের ডাটা গুলো সঠিক ভাবে সংখ্যায় ইনপুট দিন ।
তারপর আমরা length, width নামক দুটি ভ্যরিয়েবল এর দ্বারা ব্যবহারকারীর কাছ থেকে ইনপুট নিয়েছি । এরপর আমরা গুণ করে প্রিন্ট করেছি তার এরিয়াটা ।
আপনি যদি চান প্রোগ্রামটা নিচের মত করে লিখতে তাও পারবেন :
# This program will calculate the area of a rectangle print(" Do you want to calculate a rectangle's area? input the length and width of that rectangle in numbers ") length = float(input("Enter the length : ")) width = float(input("enter the width : ")) a = length * width print("area = ",a)) input("please give your feedback : ")
এখানে আমি a নামের নতুন একটি ভ্যরিয়েবল নিয়ে গুণ করেছি এবং তারপর সেই ভ্যরিয়েবল টা কে প্রিন্ট করেছি ।
আমি এরকম আরও ছোট একটি প্রোগ্রাম আপনাদের জন্য লিখে দিলাম :
# This program converts Fahrenheit to Celsius fahr_temp = float(input("Fahrenheit temperature: ")) print("Celsius temperature:", (fahr_temp - 32.0) * 5.0 / 9.0)
এরকম আরও একটি প্রোগ্রাম :
# This program calculates rate and distance problems print("Input a rate and a distance") rate = float(input("Rate: ")) distance = float(input("Distance: ")) print("Time:", (distance / rate))
প্রোগ্রামগুলো পড়ে বোঝার চেষ্টা করুন এবং নিজে নিজে এরকম আরও প্রোগ্রাম বানিয়ে ফেলুন । বুঝতে না পারলে কমেন্টে বলুন । সাধ্যমত সমস্যা সমাধানের চেষ্টা করব । আজ আর না । আগাম পর্বে While loop নিয়ে আলোচনা করব । সবাই ভাল থাকুন ।
buy lipitor 40mg pill buy lipitor 10mg generic atorvastatin 10mg pill
lipitor price atorvastatin 40mg uk order lipitor 20mg sale
order cipro – order cephalexin generic buy augmentin 625mg generic
ciprofloxacin canada – buy cheap baycip generic augmentin
buy ciprofloxacin online cheap – order cipro 500mg for sale buy augmentin 1000mg pills
buy retrovir – roxithromycin online buy buy generic zyloprim 300mg
order clozaril pill – amaryl 4mg uk famotidine 40mg price
order zidovudine 300mg generic – allopurinol medication
clozapine 50mg sale – buy coversum pill purchase famotidine pill
order seroquel 100mg without prescription – seroquel 50mg usa cheap eskalith online
cheap anafranil – order asendin 50mg sale cheap sinequan 75mg
quetiapine 100mg usa – how to buy bupropion eskalith price
order anafranil 25mg generic – buy mirtazapine tablets order doxepin 75mg online
order hydroxyzine 25mg without prescription – cheap pamelor 25 mg brand endep
order hydroxyzine 10mg without prescription – cost escitalopram 20mg order endep 10mg pills
order augmentin 625mg online – buy linezolid 600 mg without prescription buy cipro
amoxil us – buy keflex cipro oral
cost amoxiclav – buy myambutol pills oral cipro
purchase amoxil online – buy keflex generic cipro 1000mg over the counter
cleocin 150mg pill – purchase suprax online chloromycetin drug
brand azithromycin 250mg – buy tetracycline for sale where can i buy ciprofloxacin
generic azithromycin 500mg – ciplox medication buy ciplox 500 mg for sale
buy cleocin 150mg pill – buy vantin online order chloramphenicol without prescription
ivermectina online – where to buy doxycycline without a prescription buy cefaclor 250mg generic
ivermectin 12mg for humans for sale – ivermectina online cefaclor canada
order albuterol pill – brand theo-24 Cr 400mg buy generic theo-24 Cr