Updates from Pleosin Toggle Comment Threads | Keyboard Shortcuts

  • Unknown's avatar

    Pleosin 7:15 PM on June 27, 2019 Permalink | Reply
    Tags: ,   

    if you want to clear your python console, just type

    import os
    os.system('cls')
    

    and press enter. this is for windows user only.

     
  • Unknown's avatar

    Pleosin 1:03 PM on June 24, 2019 Permalink | Reply
    Tags: ,   

    input function always produces a string output. If you want to output an integer you have to use int. example

    If you want to number output from this below code

    user_input = input("enter a number: ")
    print(user_input ** 2)
    

    it’ll show error like

    Traceback (most recent call last):                                                                                                                  
      File "try_input.py", line 2, in <module>                                                                                                          
        print(user_input ** 2)
    

    So, you have to convert that string to an integer.

    user_input = input("enter a number: ")
    print(int(user_input) ** 2)
    

    If you try this now under 10, you’ll get 100.

    enter a number: 10
    100
    
     
  • Unknown's avatar

    Pleosin 12:36 PM on June 24, 2019 Permalink | Reply
    Tags: ,   

    Mapping two lists to a dictionary:

    keys = ["a","b","c"]
    values = [1, 2, 3]
    mydicts = dict(zip(keys, values))
    mydicts
    {'a': 1, 'b': 2, 'c': 3}
    
     
  • Unknown's avatar

    Pleosin 12:22 PM on June 24, 2019 Permalink | Reply
    Tags: ,   

    Python lists only contain one value divided by comma, dictionaries contain two values. Also, lists use [ ] third bracket and dictionaries use { } second bracket.

     
  • Unknown's avatar

    Pleosin 12:06 PM on June 24, 2019 Permalink | Reply
    Tags: ,   

    পাইথনের built in functions এর লিস্ট জানতে হলে পাইথন শেলে টাইপ করতে হবে

    dir(__builtins__)
    

    এন্টার দিলে বিল্ট ইন ফাংশনের লিস্ট চলে আসবে, লিস্টগুলো নিচে দেয়া হলোঃ

    ['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning', 'Child
    ProcessError', 'ConnectionAbortedError', 'ConnectionError', 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning', 'EOFError', 'Ell
    ipsis', 'EnvironmentError', 'Exception', 'False', 'FileExistsError', 'FileNotFoundError', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'I
    OError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError', 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt',
     'LookupError', 'MemoryError', 'ModuleNotFoundError', 'NameError', 'None', 'NotADirectoryError', 'NotImplemented', 'NotImplementedError', 'OSError',
     'OverflowError', 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError', 'RecursionError', 'ReferenceError', 'ResourceWarning', 'Runt
    imeError', 'RuntimeWarning', 'StopAsyncIteration', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'Timeou
    tError', 'True', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarn
    ing', 'UserWarning', 'ValueError', 'Warning', 'ZeroDivisionError', '_', '__build_class__', '__debug__', '__doc__', '__import__', '__loader__', '__na
    me__', '__package__', '__spec__', 'abs', 'all', 'any', 'ascii', 'bin', 'bool', 'breakpoint', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod',
     'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format',
     'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'l
    ist', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'repr', 'rev
    ersed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars', 'zip']
    
     
  • Unknown's avatar

    Pleosin 4:04 AM on June 24, 2019 Permalink | Reply
    Tags: ,   

    The definition of a list is a data type that contains multiple items

     
  • Unknown's avatar

    Pleosin 12:03 PM on June 23, 2019 Permalink | Reply
    Tags: ,   

    A python program is made of data objects, functions, and variable. So basically these are the three components you need to know for python programming.

     
  • Unknown's avatar

    Pleosin 4:32 AM on June 23, 2019 Permalink | Reply
    Tags: , , Pythonanywhere   

    Pythonanywhere.com বেসিক টিউটোরিয়াল 

    এরকম হতেই পারে যে আপনার কাছে এই মুহুর্তে কম্পিউটার নেই কিন্তু আপনার জরুরী কিছু পাইথন প্রোগ্রামিংয়ের কাজ করাই লাগবে। অনেকেই হয়তো রিমোট কোন এপ বা সফটওয়্যার ব্যবহার করে থাকেন এই ক্ষেত্রে। কিন্তু ধরুন রিমোটের সাহায্যেও আপনি আপনার কম্পিউটারে এক্সেস করতে পারলেন না, তাহলে কী করবেন? যদি আপনার কাছে ইন্টারনেট এক্সেসের মত কোন ডিভাইস থাকে তাহলে Pythonanywhere.com ওয়েব সাইট আপনাকে দিচ্ছে আপনার জরুরী প্রোগ্রামিংয়ের কাজ সেরে রাখার সম্পূর্ণ ফ্রি সুবিধা। কীভাবে এই ওয়েবসাইটে কোড/প্রোগ্রাম লিখে রাখতে পারবেন সেটি নিয়েই একদমই বেসিক কিছু জিনিস শেয়ার করছি এখানে। (More …)

     
  • Unknown's avatar

    Pleosin 12:02 PM on June 22, 2019 Permalink | Reply
    Tags: ওয়ার্ডপ্রেস, লোকাল সার্ভার, local server, wordpress   

    উবুন্টুতে যেভাবে লোকাল সার্ভার এবং ওয়ার্ডপ্রেস ইন্সটল দিবেন 

    গত কয়েকদিন ধরে উবুন্টুতে ওয়ার্ডপ্রেস ইন্সটল দেয়া সংক্রান্ত নানা টিউটোরিয়াল দেখছিলাম, কিন্তু পারছিলাম না। নানাভাবেই মাঝপথে আটকে যাচ্ছিলাম। এর প্রধান কারণ, আমি উবুন্টুতে নতুন। বিভিন্ন জায়গায় টার্মিনালে কোড লিখতে ভুল করছিলাম, ভুল করতে করতেই অবশেষে পেরে গেলাম পরিপূর্ণভাবে। তাই ভাবলাম এটা নিয়ে একটা টিউটোরিয়াল লিখে ফেলা যাক। (More …)

     
  • Unknown's avatar

    Pleosin 11:11 AM on June 22, 2019 Permalink | Reply  

    প্রথম পোষ্ট 

    প্রথম পোষ্টে কী লিখবো বুঝে উঠিনি এখনও। এমনই থাকুক আপাতত।

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Design a site like this with WordPress.com
Get started