Updates from August, 2019 Toggle Comment Threads | Keyboard Shortcuts
-
Pleosin
-
Pleosin
পাইথনের ভাগ নিয়ে সিম্পল কিছু আলোচনা। সাধারণত পাইথনে যখন ভাগ করা হয় তখন ভাগফল floating point আকারে প্রকাশ পায়। যেমন নিচের কোডটিকে যদি আমরা রান করি
x = 10 y = 2 result = x / y print(result)
তাহলে ভাগফল আসবে 5.0 এখন আমরা যদি চাই ভাগফলে দশমিকের পরে শূণ্য আসবে না, পূর্ণ 5 সংখ্যাটাই আসবে তাহলে সেটাকে integar নাম্বার হিসেবে সিলেট করে দিতে হবে। সেটা কীভাবে?
x = 10 y = 2 result = int( x / y ) print(result)
এবার কোডটিকে রান করলে সেটা পূর্ণ সংখ্যা 5 হিসেবে প্রকাশ পাবে।
ভাগশেষ বের করতে হলে % ব্যবহার করতে হয়। যেমন, 10/3 এর ভাগশেষ জানতে হলে নিচের কোড রান করতে হবে
x = 10 y = 3 result = x % y print=(result)
কোডটি রান করে দেখুন, ভাগশেষ দেখাচ্ছে 1
আপনি যদি পাইথনে ভাগফল এবং ভাগশেষ দুটো একইসাথে দেখতে চান তাহলে সেটা হবে divmod দিয়ে। যেমন নিচের কোডটি রান করুন
x = 10 y = 3 result = divmod (x, y) print(result)
এবার দেখুন ভাগফল এবং ভাগশেষ একইসাথে (3, 1) আকারে দেখাচ্ছে।
-
Pleosin
-
Pleosin
How To Install Django on Windows 10 | Use Django with ATOM
This tutorial will not only help you answer the how to install Django on Windows 10 question but also help you install Django if you have Windows 7, Windows 8 or Windows 8.1.
You can follow the same steps for all the windows versions mentioned above. (More …)
Pleosin
Debugging Python Applications with pdb

Debugging isn’t a new trick – most developers actively use it in their work. Of course, everyone has their own approach to debugging, but I’ve seen too many specialists try to spot bugs using basic things like print instead of actual debugging tools. Or even if they did use a debugging tool, they only used a small set of features and didn’t dig deeper into the wide range of opportunities good debuggers offer. And which could have saved those specialists a lot of time. (More …)
Pleosin
Basic data types and structures practice in python
###############
## Problem 1 ##
###############
## Given the string:
s = ‘django’
(More …)
Pleosin
Build a school timetable with python
Today, we’ll learn how with a simple script, we can create a program which helps us to build a school timetable.
We suppose that as a school manager, we want to make easy the way to establish a school timetable for each class. (More …)
Pleosin
Pythonanywhere.com বেসিক টিউটোরিয়াল
এরকম হতেই পারে যে আপনার কাছে এই মুহুর্তে কম্পিউটার নেই কিন্তু আপনার জরুরী কিছু পাইথন প্রোগ্রামিংয়ের কাজ করাই লাগবে। অনেকেই হয়তো রিমোট কোন এপ বা সফটওয়্যার ব্যবহার করে থাকেন এই ক্ষেত্রে। কিন্তু ধরুন রিমোটের সাহায্যেও আপনি আপনার কম্পিউটারে এক্সেস করতে পারলেন না, তাহলে কী করবেন? যদি আপনার কাছে ইন্টারনেট এক্সেসের মত কোন ডিভাইস থাকে তাহলে Pythonanywhere.com ওয়েব সাইট আপনাকে দিচ্ছে আপনার জরুরী প্রোগ্রামিংয়ের কাজ সেরে রাখার সম্পূর্ণ ফ্রি সুবিধা। কীভাবে এই ওয়েবসাইটে কোড/প্রোগ্রাম লিখে রাখতে পারবেন সেটি নিয়েই একদমই বেসিক কিছু জিনিস শেয়ার করছি এখানে। (More …)

Reply