Single Choice Moderate

Qনিচের কোনটি print() ফাংশনের জন্য বিকল্প লাইন সমাপ্তি (Alternative Line Ending) হিসেবে * চিহ্ন ব্যবহার করবে?

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

Choose the Best Option

Click any option to instantly check if you're correct.

  • A end to * ✔ ✖
  • B end as * ✔ ✖
  • C end = '' ✔ ✖
  • D ending = '' ✔ ✖
Correct Answer

Explanation

Python-এর print() ফাংশনে end প্যারামিটার ব্যবহার করে লাইনের শেষে (Line Ending) কী প্রদর্শিত হবে তা নির্ধারণ করা যায়। ডিফল্টভাবে print() প্রতিটি আউটপুটের শেষে একটি নতুন লাইন (\n) যোগ করে।

যদি নতুন লাইনের পরিবর্তে * চিহ্ন প্রদর্শন করতে চান, তাহলে end='*' ব্যবহার করতে হবে।

উদাহরণ:

print("Python", end="*") print("Programming")

আউটপুট:

Python*Programming

অন্যান্য বিকল্পগুলো সঠিক নয়, কারণ end to *, end as * এবং ending='*' Python-এর বৈধ (Valid) সিনট্যাক্স নয়।

তাই সঠিক উত্তর হলো বিকল্প C) end='*'।

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.