Multiple Choice Easy

QPython-এ Input নেওয়ার জন্য কোন Function ব্যবহৃত হয়?

ID: #25294 Python প্রোগ্রামিংয়ের মৌলিক বিষয় 21 views
Question Info
#25294Q ID
EasyDifficulty
Python প্রোগ্রামিংয়ের মৌলিক বিষয়Topic

Select All That Apply

Tick every correct option, then press Check Answer.

  • A scanf() ✔ ✖
  • B get() ✔ ✖
  • C input() ✔ ✖
  • D read() ✔ ✖
Correct Answer

Explanation

বিস্তারিত ব্যাখ্যা:

Python-এ ব্যবহারকারীর কাছ থেকে তথ্য (Input) গ্রহণ করার জন্য input() ফাংশন ব্যবহার করা হয়। এই ফাংশন প্রোগ্রাম চলাকালীন ব্যবহারকারীর কাছ থেকে একটি মান গ্রহণ করে এবং সেটি একটি ভেরিয়েবলে সংরক্ষণ করা যায়।

উদাহরণ:

name = input("আপনার নাম লিখুন: ")

print("স্বাগতম,", name)

উপরের প্রোগ্রামে input() ফাংশন ব্যবহারকারীর কাছ থেকে নাম গ্রহণ করবে এবং সেই মান name ভেরিয়েবলে সংরক্ষণ করবে। এরপর print() ফাংশনের মাধ্যমে সেই নাম প্রদর্শন করা হবে।

Python 3-এ input() ফাংশন দ্বারা প্রাপ্ত ডাটা ডিফল্টভাবে String (স্ট্রিং) হিসেবে সংরক্ষিত হয়। যদি সংখ্যাসূচক মান নিয়ে গাণিতিক কাজ করতে হয়, তাহলে int() বা float() ব্যবহার করে ডাটা রূপান্তর করতে হয়।

প্রদত্ত অপশনগুলোর মধ্যে scanf() সাধারণত C ভাষায় ব্যবহৃত হয়, read() ফাইল থেকে ডাটা পড়ার ক্ষেত্রে ব্যবহৃত হতে পারে এবং get() Python-এর সাধারণ Input Function নয়। তাই Python-এ Input নেওয়ার জন্য সঠিক Function হলো input()।

মনে রাখুন: Python-এ ব্যবহারকারীর কাছ থেকে Input গ্রহণ করার জন্য input() Function ব্যবহার করা হয়।
Today: 0 answered · 0 correct
Save progress
Free account

Want to remember what you got wrong?

Create a free account in seconds to track your score, revisit mistakes and continue মডার্ন কম্পিউটার অ্যাপ্লিকেশন ও কম্পিউটার বিজ্ঞান - দ্বাদশ শ্রেণী (Class 12) - WBCHSE where you left off.

  • Save your progress & streak
  • Topic-wise quizzes & scores
  • Bookmark tricky questions
  • Printable MCQ sets
Practice smarterFree account · save progress
Sign up free

Share This Question

Challenge a friend or share with your study group.