Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Thursday 30 April 2020

Turn off the rightmost set bit | Python

Question: Write a program that unsets the rightmost set bit of an integer. Input: 12 Output: 8 Input: 7 Output: 6 Simple code: n=int(input()); print(n & (n-1)) Prerequisite: Data Type Conversion | Python | Castor Classes https://www.youtube.com/watch?v=z8yw6... Relationship between binary representation of n & n-1 | Python | Castor Classes https://www.youtube.com/watch?v=iTxc9... Python for beginners: https://www.youtube.com/watch?v=egq7Z..

Join: t.me/clcoding_python

Relationship between binary representation of n & n-1 | Python

Let's learn Python from basics.

Prerequisite:
Data Type Conversion | Python | Castor Classes
https://www.youtube.com/watch?v=z8yw67K8rC0 Python for beginners:
https://www.youtube.com/watch?v=nAWv9rGwGMQ&list=PLNhFkFk6qEgIq3lcbmxWIBFjEcq4lwRyk

Join: t.me/clcoding_python


Like us: https://www.facebook.com/pirawenpython/

Checking a number is Odd or Even using Bitwise Operators | Python

Prerequisite:
Bitwise Operation in Python | Castor Classes
https://www.youtube.com/watch?v=mqkBM9Nwy3k Python for beginners:
https://www.youtube.com/watch?v=nAWv9rGwGMQ&list=PLNhFkFk6qEgIq3lcbmxWIBFjEcq4lwRyk

Join: t.me/clcoding_python

#Code
e=10;
e%2==0

True

f=11;
f%2==0

False 

Like us: https://www.facebook.com/pirawenpython/

Tuple in Python | Part 2

Topics discussed in this video:
1)Accessing Elements of a Tuple
2)Creating New Tuples from Existing Tuples
3)Iterating Over Tuples
4)length of a Tuple
5)count how many times a specified value appears in a Tuple
6)find out the (first) index of a value in a Tuple
7)Checking if an Element Exists
8)Nested Tuples
9)Can we add or remove elements from a Tuple?

Prerequisite: Tuple in Python | Castor Classes https://www.youtube.com/watch?v=QJcs3... Python for beginners: https://www.youtube.com/watch?v=egq7Z...

Nested List & Matrix | List in Python | Part 7

Python for beginners: https://www.youtube.com/watch?v=egq7Z...

#Code to take Matrix input from user in Python
row=int(input("Enter the number of row:"));
column=int(input("Enter the number of columns:"));
l=[];
rs=[];
i=0;
j=0;
while i<row:
    while j<column:
        u=int(input());
        rs.append(u);
        j=j+1;
    l.append(rs);
    rs=[];
    j=0;
    i=i+1;
l



Wednesday 29 April 2020

Converting an Input String into a Floating Point Number | Python

List Traversal using while loop & break statement | Python

Code: mylist=[]; l=int(input()); i=0; while(i<l): m=int(input()); mylist.append(m); i=i+1; i=0; g=0; while(i<=l-2): es=mylist[i]; ms=mylist[i+1]; if(es==ms and ms==4): g=g+1; break; i=i+1; if(g==0): print(False); else: print(True);


Python for beginners: https://www.youtube.com/watch?v=egq7Z...

Int to String ,Float to String ,String to Int & String to Float conversion | Python

Topics covered: 1)Integer to String conversion 2)Float to String conversion 3)String to Integer conversion 4)String to Float conversion 5)Different way to concatenate string Python for beginners: https://www.youtube.com/watch?v=egq7Z...


Telegram: https://t.me/clcoding_python https://www.facebook.com/pirawenpython/ https://www.facebook.com/groups/piraw...

Stacks and Queues using List | Data Structures | Python

Topics discussed: 1)Stack using List 2)Queue using List Prerequisite: List in Python | Part 1 | Castor Classes https://www.youtube.com/watch?v=P2ogQ... List in Python | Part 2 | Castor Classes https://www.youtube.com/watch?v=vNxxQ... Python for beginners: https://www.youtube.com/watch?v=egq7Z...

Tuesday 28 April 2020

Tuple in Python

Topics covered: 1)Tuple 2)Packing 3)Unpacking 4)Swap two variables using Packing & Unpacking concept 5)Tuple with List Python for beginners: https://www.youtube.com/watch?v=egq7Z...



Web 🌐http://www.clcoding.com/ Telegram: https://t.me/clcoding_python https://www.facebook.com/pirawenpython/ https://www.facebook.com/groups/piraw..

Subtract the Product and Sum of Digits of an Integer | Python

Prerequisite:
Sum of Digits of a number | Python | Castor Classes
https://www.youtube.com/watch?v=IBK1-... Python for beginners:
https://www.youtube.com/watch?v=egq7Z...


Maximum 69 Number | Python

Check the problem statement here:
https://leetcode.com/problems/maximum... Prerequisite: List in Python | Part 6 | Castor Classes https://www.youtube.com/watch?v=kIpXn...

Factorials of large numbers | Python

In Python, value of an integer is not restricted by the number of bits and can expand to the limit of the available memory. Thus we never need any special arrangement for storing large numbers. Prerequisite: Loops in Python | Castor Classes https://www.youtube.com/watch?v=SZmbd


Monday 27 April 2020

Advanced Guide to Python 3 Programming for Undergraduate Topics in Computer Science pdf

Advanced Guide to Python 3 Programming delves deeply into a host of subjects that you need to understand if you are to develop sophisticated real-world programs. Each topic is preceded by an introduction followed by more advanced topics, along with numerous examples, that take you to an advanced level.

There are nine different sections within the book covering Computer Graphics
(including GUIs), Games, Testing, File Input and Output, Databases Access, Logging, Concurrency and Parallelism, Reactive programming, and Networking. Each section is self-contained and can either be read on its own or as part of the book as a whole.

This book is aimed at the those who have learnt the basics of the Python 3 language
but want to delve deeper into Python’s eco system of additional libraries and modules,
to explore concurrency and parallelism, to create impressive looking graphical interfaces, to work with databases and files and to provide professional logging facilities.
Buy: Advanced Guide to Python 3 Programming (Undergraduate Topics in Computer Science) Paperback – 30 September 2019 by John Hunt (Author)
PDF Download:

A Beginners Guide to Python 3 Programming for Undergraduate Topics in Computer Science by John Hunt PDF

This textbook on Python 3 explains concepts such as variables and what they represent, how data is held in memory, how a for loop works and what a string is. It also introduces key concepts such as functions, modules and packages as well as object orientation and functional programming. Each section is prefaced with an introductory chapter, before continuing with how these ideas work in Python.

Topics such as generators and coroutines are often misunderstood and these are explained in detail, whilst topics such as Referential Transparency, multiple inheritances and exception handling are presented using examples.

A Beginners Guide to Python 3 Programming provides all you need to know about Python, with numerous examples provided throughout including several larger worked case studies illustrating the ideas presented in the previous chapters.
Buy: A Beginners Guide to Python 3 Programming (Undergraduate Topics in Computer Science) Kindle Edition by John Hunt (Author) Format: Kindle Edition
PDF Download :

Maximum Occurring character | Python | Castor Classes

Code:


t=int(input());
i=0;
while(i<t):
    a=input();
    character='';
    count=0;
    output=a[0];
    max=a.count(output);
    for ig in a:
        c=a.count(ig);
        if(c>max):
            max=c;
            output=ig;
        elif(c==max and output>ig):
            output=ig;
    print(output);
    i=i+1;

Python for beginners: https://www.youtube.com/watch?v=egq7Z...

Join us : t.me/clcoding_python

Sum of Digits of a number | Python | Castor Classes

Code: t=int(input()); i=0; while(i<t): a=int(input()); w=str(a); e=list(w); output=0; for ij in e: output=output+int(ij); print(output); i=i+1;

Python for beginners: https://www.youtube.com/watch?v=egq7Z...

Check whether K-th bit is set or not | Python | Castor Classes

Code:


t=int(input());
i=0;
while(i<t):
    a=int(input());
    k=int(input());
    w=bin(a);
    w=w[2:];
    if(w[len(w)-k-1]=='1'):
        print("Yes");
    else:
        print("No");
    i=i+1;
Python for beginners: https://www.youtube.com/watch?v=egq7Z...

Popular Posts

Categories

AI (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (117) C (77) C# (12) C++ (82) Course (62) Coursera (180) Cybersecurity (22) data management (11) Data Science (95) Data Strucures (6) Deep Learning (9) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (44) Meta (18) MICHIGAN (5) microsoft (4) Pandas (3) PHP (20) Projects (29) Python (753) Python Coding Challenge (228) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses