Sunday, April 5, 2020

Strings in Python

In this video, I have discussed in detail about Strings in Python. I have discussed various string related operations such as Indexing, Slicing, Formatting, Splitting, Concatenation, and Containment. I have also discussed major string related functions available in Python and how to use them.

Click the following link to watch the video:

Strings

If you want more videos then please subscribe to my channel.

Data types and Conversion between data types in Python

In this video, I have discussed the various data types available in Python i.e. Numbers data type(int, float, complex), String data type and Collection data type(Lists, Dictionaries, Tuples, and Sets). I have also discussed how to convert between the data types.
Click the following link to watch the video:

Data types and Conversion between data types

If you want more videos then please subscribe to my channel.

Variables and Assignments in Python

In the following video, I have discussed how to declare variables in Python and assign values to them. I have also discussed how to perform multiple assignments to multiple variables in Python.

Click the following link to watch the video:

Variables and Assignments

If you want more videos then please subscribe to my channel.

Getting started with Python

I have started my own Python Tutorial Series starting from the basics for absolute beginners.

I have discussed all the important concepts regarding competitive programming in Python.

Click the following link:

Getting Started with Python

If you want more videos then please subscribe to my channel.

Friday, February 7, 2020

Day of the Programmer : Algorithms - Implementation

#The solution in Python3 is as follows:


def solve(year):
    if (year == 1918):
        return '26.09.1918'
    elif ((year <= 1917) & (year%4 == 0)) or ((year > 1918) & (year%400 == 0 or ((year%4 == 0) & (year%100 != 0)))):
        return '12.09.%s' %year
    else:
        return '13.09.%s' %year
y=int(input())
print(solve(y))

#Keep visiting for more solutions of HackerRank problems in Python 3.Thank you!!!

Saturday, September 1, 2018

Birthday Chocolate : Algorithms - Implementation

#The solution in Python3 is as follows:


def solve(n, a, d, m):
    count = 0
    for i in range(0,n):
          total = sum(a[i:m+i])
          if total == d:
                count+=1
         return count
n=int(input())
a=list(map(int,input().split()))
d,m=map(int,input().split())
print(solve(n,a,d,m))

#Keep visiting for more solutions of HackerRank problems in Python 3.Thank you!!!

Monday, August 13, 2018

Game of Coins : Basic Programming - Implementation - Basics of Implementation

#The solution in Python3 is as follows:


ALICE = 'Alice'
BOB = 'Bob'
# Write your code here
def lolo(N):
    return ALICE
   

def init():
    T = input()
    for num_testcases in range(int(T)):
           A = int(input())
           x = lolo(A)
           print(x)
init()

#Keep visiting for more solutions of HackerEarth problems in Python 3.Thank you!!!