Python String Manipulation, If else and iteration example

## program to demonstrate input output of strings

import time

print ('Hello there I am Python \n')
name= input('What is your name ? \n')
print ('Hi,'+ name + ' Welcome \n')
age = input('What is your age in years?  \n')
age = int(age)
if age >= 18 :
    print('You can apply for driving license\n')
    choice = input('Do you want to apply Y/N \n')
    if choice == 'Y' or choice =='y' :
        print('Come to nearest Driving Test Centre')

        print('Then why are you wasting my time, Buzz off')

    print('Sorry ' + name + 'you are under age ')

""" For iteration
print (' Reversing your age')
while age > 1 :
    print (age)
    age -=1
    print('You are now ' + str(age)+' Years old')
now = time.time()
print (time.strftime("%b,%d,%Y, %H:%M:%S", time.gmtime(now)))
print (time.timezone)

## End Code

Simple Mortgage calculator

## This is a program to calculate mortgage

cost = input('Please enter the cost of property(Numbers only)\n')
cost = float(cost)
downpayment = input('Please enter your contribution (Numbers only)\n')
downpayment = float(downpayment)
interest_rate = input('What interest rate are you comfortable with \n')
interest_rate =float(interest_rate)
repay_years = input('In how many years will you repay the loan?(Number Only)')
repay_years = int(repay_years)
loan_amount = cost - downpayment
repay_months = repay_years *12
repay_months =int(repay_months)
mortgage_rate = interest_rate * (1/100)
emi = loan_amount / repay_months
emi = emi + ((emi*mortgage_rate)/ repay_months)
emi = int(emi)

print ('The cost of your selected property is'+ str(cost) + '\n')
print ('You will put in'+ 'Rs. ' + str(downpayment) +'\n')
print ('Your loan amount is Rs. ' + str(loan_amount)+ '\n')
print ('Your EMI'+' Over '+ str(repay_months) + ' months ' '@'+ str(interest_rate)+ ' % will be Rs.'+ str(emi)+'\n')

## End Of Code


My experience with learning python

I recently had an idea for developing a data analysis web application and I posted a project on the freelance marketplace to get offers from relevant developers. I wanted the project to be implemented in python as I had heard a lot about the advanced capabilities for this programming language for big data projects.

My experience however for this project was disappointing as I couldn’t find a suitable developer who could develop the MVP for my project. I believed there are two reasons why I couldn’t find a suitable candidate

  1. The number of experienced python programmers is very less compared to the PHP developers.
  2. The experienced developers are charging very high due to rising popularity of this language

Even though I decided to drop the project at that time, it gave me the challenge to learn python as a language. I decided to learn Python there and then.

Let’s be realistic, My goal isn’t to become a python Guru, but I do intend to learn the language up to a point where I can develop some simple programs,  modify existing python code and debug Python programs.

I will be posting my progress and python code at the following URL

Python Coding Examples