Monday, 22 January 2024

Code for my work PLEASE IGNORE

 from datetime import datetime

firstnames=input('First name of tenant(s)')

rentincreasedate= input("DD/MM/YYYY for rent increase date")

RID=datetime.strptime(rentincreasedate,"%d/%m/%Y").date()

RID1=datetime.strftime(RID,"%d %B, %Y")

if RID1[0]=='0':

    RID1=RID1[1:]

print(RID1)

periodstart=input("DD/MM/YY for start of payment period")

startperiod=datetime.strptime(periodstart,"%d/%m/%Y").date()

sp=datetime.strftime(startperiod,"%d %B, %Y")

if sp[0]=='0':

    sp=sp[1:]

periodend=input("DD/MM/YY for end of payment period")

endperiod=datetime.strptime(periodend,"%d/%m/%Y").date()

ep=datetime.strftime(endperiod,"%d %B, %Y")

if ep[0]=='0':

    ep=ep[1:]

deposit=float(input("Deposit held?"))

rpw=float(input("Old rent per week"))

ripw=float(input("New rent per week"))

periodlength= endperiod.toordinal()-startperiod.toordinal()+1

if periodlength==7:

    var="weekly"

elif periodlength==14:

    var='fortnightly'

elif periodlength<=31 or periodlength>=28:

    var='monthly'

else:

    print('wtf')

period1length= (RID.toordinal()-1) - startperiod.toordinal()+1

period2length= endperiod.toordinal() - RID.toordinal() + 1

period1= round(rpw/7*period1length,2)

period2= round(ripw/7*period2length,2)

tot= round(period1+period2,2)

tonobal= round(tot-deposit,2)

if var=='monthly':

    np= ripw/7*365/12

if var=='fortnightly':

    np= ripw*2

if var=='weekly':

    np= ripw

print(period1length, period2length, "${:.2f}".format(period1), period2)

RIDminus= datetime.fromordinal((RID.toordinal()-1))

epplus= datetime.fromordinal((endperiod.toordinal()+1))


RID1_=datetime.strftime(RIDminus,"%d %B, %Y")

if RID1_[0]=='0':

    RID1_=RID1_[1:]

ep_=datetime.strftime(epplus,"%d %B, %Y")

if ep_[0]=='0':

    ep_=ep_[1:]

print('Hello', firstnames+", \n \nI hope this email finds you well. \n ")

print("As the rent increase has taken effect from", RID1+", please see below for the rent adjustment calculation for the", var, "payment for the period", sp, "-", ep+":")

print()

print("$" + str(rpw) + "/PW:", sp, "-", RID1_, "=", str(period1length), "days")

print("$"+str(rpw), "/ 7 days x", str(period1length), "days =", "$"+str(period1))

print()

print("$"+str(ripw)+"/PW:", RID1, "-", ep, "=", str(period2length), "days")

print("$"+str(ripw), "/ 7 days x", str(period2length), "days =", "$"+str(period2))

print()

print("Total balance to be paid for the following period:")

print("${:.2f}".format(period1), "+", "${:.2f}".format(period2), "=", "${:.2f}".format(tot))

if deposit>0:

    print("Balance paid:", "${:.2f}".format(deposit))

    print("Remaining balance to be paid:", "${:.2f}".format(np), "-", "${:.2f}".format(deposit), "=", "${:.2f}".format(tonobal))

print()

print("From", (ep_)+", the new", var, "payment is", "${:.2f}.".format(np))

print("\nPlease let us know if there are any questions about the calculation. Thank you sincerely.")

Saturday, 4 June 2016

Research On Racism (English Literature Holiday Homework)

Research On Racism
English Literature Holiday Assignment


a. What factors in American society caused the problem of racism?
Answer- Social and economic status of an ethnic group or a person, learning wrong things and raised with a lack of diversity are some factors in the American society that caused racism. As an example, the social and economic status can cause a feeling of superiority amongst some people over the African Americans.  This can cause people to generalize all African Americans as “poor” since the number is so high.

b. Which group of people (children, adults, poor, wealthy, senior citizens) were generally affected by this problem?
Answer- All black people were generally affected by racism.

c. What could individuals do to solve this problem?
Answer- There are many things you can do to stop racism. Some ways to stop racism is to report whether someone is doing racism or being racist, you can participate in the fight to stop racism, like spread awareness, et cetera and you can also support victims of racism.

d. What changes did American society make to solve this problem?
Answer- American society made laws to stop racism, like no slavery to anybody, et cetera. But racism isn't stopped yet, as many people still be racist and do racist despite the rules and laws. Many people still insult and injure each other due to race. So we must, as humans, stop racism, by learning that we are all equal and treat each other equally, as well as spread awareness of this problem.

Sources

"What Causes Racism?" Trellix, n.d. Web. 4 June 2016. <http://carlie1230.tripod.com/id2.html>.

Wednesday, 23 March 2016

A Random Haiku

So, hello. This is my first blog. Thanks for reading, hope you enjoy. I don't know what to post here. But I'll post a haiku right now.

A Random Haiku
By PTCVBF

This is my first post,
I don't know what to do, but,
I say bye to you.