Tuesday, November 10, 2020

How to make a Snake game using Python..

 





import turtle
import time
import random
delay=0.1
# set up the screem
win= turtle.Screen()
win.title("Snake Game By Sumit Sarkar  ")
win.bgcolor("green")
win.setup(width=600,height=600)
win.tracer(0)
#snake head
head=turtle.Turtle()
head.speed(0)
head.shape("square")
head.color("black")
head.penup()
head.goto(0,0)
head.direction="stop"
#Snake food
food=turtle.Turtle()
food.speed(0)
food.shape("circle")
food.color("red")
food.penup()
food.goto(0,100)

segments= []
#functions

def go_up():
    if head.direction!="down":
        head.direction ="up"
def go_down():
    if head.direction!="up":
        head.direction="down"
def go_right():
    if head.direction!="left":
        head.direction="right"
def go_left():
    if head.direction!="right":
        head.direction="left"
def move():
    if head.direction == "up":
        y = head.ycor()
        head.sety(y+20)
    if head.direction == "down":
        y = head.ycor()
        head.sety(y-20)
    if head.direction == "left":
        x = head.xcor()
        head.setx(x-20)
    if head.direction == "right":
        x = head.xcor()
        head.setx(x+20)
    

#keyboard binding
win.listen()
  
win.onkeypress(go_up,"w")   
win.onkeyrelease(go_down,"s")
win.onkeypress(go_left,"a")
win.onkeypress(go_right,"d")
#maingameloop
while True:
    win.update()
    #chack for collision with the border
    if head.xcor()>290 or head.xcor()<-290 or head.ycor()>290 or head.ycor()<-290:
        time.sleep(1)
        head.goto(0,0)
        head.direction='stop'
        #hide the segment
        for segment in segments:
            segment.goto(1000,1000)
        #clear the segments
        segments.clear()
    # chack for a collision with the food
    if head.distance(food)<20:
        #move the food to a random spot
        x=random.randint(-290290)
        y= random.randint(-290290)
        food.goto(x,y)
        #add a segment
        new_segment=turtle.Turtle()
        new_segment.speed(0)
        new_segment.shape("square")
        new_segment.color("grey")
        new_segment.penup()
        segments.append(new_segment)
    # move the end segments first in reverse order
    for index in range(len(segments)-1,0,-1):
        x=segments[index-1].xcor()
        y=segments[index-1].ycor()
        segments[index].goto(x,y)
    # move segment 0 to where the head is
    if len(segments)>0:
        x=head.xcor()
        y=head.ycor()
        segments[0].goto(x,y)

    move()
    
    # check for head collision with the body segments
    for segment in segments:
        if segment.distance(head) < 20:
            time.sleep(1)
            head.goto(0,0)
            head.direction="stop"
            for segment in segments:
                segment.goto(10001000)

            segments.clear()
   

    time.sleep(delay)

win.mainloop()

Friday, September 18, 2020

Ugly face of Beautiful Companies.

 I hope you help me put pressure on the company behind this. Let's begin with the ugly face of the beauty industry and company.


 

MICA are sparkly minerals that helps makeup shine. And makeup has a lot of MICA in it. It is mind  in place like MADAGASCAR  and INDIA  unfortunately, often by children as


young as 4 years old here small bodies and fragile hands do the work because they can fit the narrow mine tunnels. For many research and discover there are over 32K children miners of MICA just in INDIA and MADAGASCAR in this half a billion  dollar industry they work for less than a dollar a day and they risk their lives for that dollar.

When tunnels collapse some children get injured, paralyzed , and even die. Around 20 children die in the name of makeup every month just in one of the mines in india. 
The world's chief deposits of mica are found in India at Bihar and in the Nellore district of Madras. Over 50% of the mica used today comes from these two regions. 



Despite this tough truth companies continue profiting off  of MICA. And no one talks about it. This is not a end of the story but make up is not the only industry built on the struggle of children. 
Most of the children love chocolate, but it is painful to see that some are forced to make it. The chocolate industry hires over 2 million underage worker globally. 

In fact, as we continue to consume more chocolate child workers in the past 10 years increase by 11%. 


 They climb the coco trees and caring heavy and dangerous knives. They carry bags taller then their own bodies and some of them if they don't work fast enough , they get beaten.
Investigation of some organization  show that a lot of these kinds especially in Africa are

trafficked and forced to work, many of them don't ever get to taste the chocolate. And this has been known for 19 years now. Companies promised to end cocoa child labor and even spent 215 million dollar to address this in IVORY COAST and GANA. But after 19 years the same companies are still making big profits off of the cheap trafficked child labor.
The saying "Chocolate is your guilty pleasure" has a very different meaning now. But wait it is not your fault we can't really be blamed for this. Truth is for us regular people it is very hard to avoid using or eating products that are not ethical. There are more of them in shops than we think but products should be labeled if child labor is involved in them or not. So that at least we as a consumers know that what we buy.

This is not a last . "COBALT"  is essential in powering batteries that are used in electric cars, laptops and smartphones. And this industry hires over 40,000 children. Kids was the rocks inhale TOXIC gas, and carry heavy snacks they snacks they don't have protective gear, they  risk getting a lung cancer often  work for 12 hours a day, and despite the very expensive technology they often get paid less than a dollar a day.  

 We know that it is a very tough truth. But together we can make their lives better for many years children are silently crying because companies are deaf to their cries. Paraphs it's the time we the adults come together and do something for  these children. So that the companies can come up with better solutions and stop the unethical child  labor.

Tuesday, September 1, 2020

Know about a Former President of India(2012-2017) Pranab Mukherjee.(1935-2020)

 



Pranab Mukherjee A Former President of India. He served our nation for 6 years. 

He was born into a bengali family at a Mirati, a village in the Bengal Presidency of British India( now in Birbhum district, West Bangal.).Mukherjee's father, Kamada Kinkar Mukherjee, was deeply involved in India's struggle for independence from British in the first half of 20th century.

Pranab was educated at the Suri Vidyasagar Collage and earned an advanced degree in history and political science and law degree from the university.

In 1963 he accepted a teaching position at a collage near  Kolkata. He also a editor of Bengali-language monthy periodical and later worked for weekly publication.. 

Mukherjee started his political career as a founding member of the  "Bangla Congress". He became   a member of Rajya Sacha in July 1969 on Bangla Congress ticket. The Prime Minister of India , Indira Gandhi  recognised his talents and  recruited him to her party, The Indian National Congress. Mukherjee was re-elected in the house in 1975,1981,1993 and 1999. Mukherjee became a Gandhi loyalist and he was appointed Union Deputy Minister of Industrial Development in Indira Gandhi's cabinet in 1973. In 1979 Mukkherjee became Deputy Leader of the INC in the Rajya Sabha and in 1980 he was appointed Leader of the House. And in 1982 he became Finance Minister to 1987. In between 1986 Mukherjee founded another party, the Rashtriya Samajwadi Congress(RSC), in West Bangal. And RSC had fared terribly in the 1987 Assembly polls in West Bangal. In 1991 P.V Narasimha Rao  appointed as deputy chairman of the India Planning Commission and subsequently as a union cabinet minister. He served as External Affairs Minister for the first time from 1995 to 1996 in Rao's cabinet. When Sonia Gandhi enter the politics, he was made General Secretary of the  AICC in 1998-99 after Sonia Gandhi became Congress President Mukherjee was made President of West Bengal Congress in 2000. Mukherjee once again became the Finance Minister of India in 2009. And in 2010 Mukherjee was awarded 'Finance Minister of the Year for Asia'. Mukherjee was nominated as the presidential candidate of the United Progressive Alliance on  15 June 2012 against NDA candidate P.A Sangma. 

In the election , Mukherjee received 713,763 votes while Sangma had 315,987. 


Pranab Mukherjee married Suvra Mukherjee on 13 July 1957. They had two sons and a daughter. Suvra died on 18 August 2015 aged 74 of heart failure while Mukherjee was still in office. 


During the COVID-19 pandemic, on 10 August 2020 he twitted that he had tested positive for COVID-19 prior to his surgery to remove a blood clot in his brain. He was admitted to the hospital after accidentally slipping and falling in his bathroom. He was on ventilator support and in critical condition at the Army's Research and Referral hospital in Delhi. On 13 August , the hospital reported that Mukherjee was in deep coma after he underwent brain Surgery. 

Mukherjee died on 31 August 2020, aged 84. He was a 13th President of India.


Saturday, May 30, 2020

Samsung Galaxy M11, Galaxy M01 Set to Launch in India on 2nd june 2020.

Samsung Galaxy M11 and Galaxy M01 launch in India will take place at 12pm (noon) on June 2.


Samsung Galaxy M11, Galaxy M01 Set to Launch in India on June 2, Flipkart Reveals


Flipkart has released dedicated teasers for the Samsung Galaxy M11 and Galaxy M01 through its mobile site and app that reveal the launch date of both new models.
 The launch will take place2nd june 2020  at 12pm (noon) .


Specification :- 

 Display:  6.4-inch HD+ (720x1560 pixels)with a hole-punch design octa-core SoC

 RAM :-4GB . 

Camera:- triple rear camera setup that includes a 13-megapixel primary sensor with an f/1.8 lens and a 2-megapixel depth sensor with an f/2.4 lens. There is also a 5-megapixel wide-angle shooter that has a field-of-view (FoV) of 115 degrees and an f/2.2 aperture. For selfies, the handset offers an 8-megapixel camera sensor at the front along with an f/2.0 lens.

Memory:- The Galaxy M11 comes with microSD card support to enable storage expansion up to 512GB. 

Connectivity:-  4G, Wi-Fi 802.11 b/g/n, Bluetooth 4.2, and GPS/ A-GPS. There is a rear-mounted fingerprint sensor \

Battery :   5,000mAh battery that supports 15W fast charging.


Wednesday, May 27, 2020

Jio Fiber will give double data monthly benefit on Annual Subscriptions:

Jio Fiber’s Titanium plan now includes big 15,000GB of monthly data on Annual Subscriptions:

Jio Fiber Introduces Double Data Monthly Benefit on Annual Subscriptions: All Details



 Jio Fiber is now offering additional data for Silver annual plan subscribers. The Silver plan 12-month subscription now offers 800 GB of total monthly data, with the additional annual benefit at 200 GB. This plan includes 200 GB plan benefit, 200 GB double data benefit, 200 GB introductory data, and 200 GB of annual plan benefit. Similarly, the Gold plan offers a total of 1,750 GB of monthly data for annual subscribers.

Saturday, May 16, 2020

AMD Processor

Advanced Micro Device Inc. (AMD), founded in 1969 and based in Sunnyvale, California, provides microprocessors. It is Intel's primary competitor in the IBM compatible PC market.
AMD is best known for its Athlon, Opteron, Turion 64, Sempron and Duron microprocessors.

Saturday, May 9, 2020

Redmi Note 9 Pro Max First Sale Set for May 12 ,2020. In India

xiaomi launched Redmi Note 9 Pro Max  in India, price starts from Rs. 16,499, and the sale will begin in 12th May 2020  at 12pm (noon) IST.




Redmi Note 9 Pro Max First Sale Set for May 12: Price in India, Specifications



Redmi Note 9 Pro Max first sale date has now been revealed. Xiaomi phone was launched along time the Redmi Note 9 Pro in India back in March. The sale of the Xiaomi Redmi Note 9 Pro began in the year, but the sale of the Redmi Note 9 Pro Max got delayed due to the nationwide or worldwide lockdown in all over the world. Xiaomi recently started reselling smartphones in the country, and now it has announced the first sale date for the Redmi Note 9 Pro Max. It has also revised the price of the phone due to the recent increase in GST rate from 12 percent to 18 percent.