My Python code collection! - Deepstash
My Python code collection!

My Python code collection!

Ideas, facts & insights covering these topics:

2 ideas

·

11 reads

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

hackerrank 2d array: day 11 of 30 days of code

#!/bin/python3

import math

import os

import random

import re

import sys

if __name__ == '__main__':

    arr = []

    for _ in range(6):

        arr.append(list(map(int, input().rstrip().split())))

    sum = 0

    tarr = []

    

    for l in range(0,4):

        for k in range(0,4):

            for i in range(l,l+3):

                for j in range(k,k+3):

                    if i == l+1 and ( j == k or j == k+2):

                        continue

                    else:

                        sum += arr[i][j]

            tarr.append(sum)

            sum = 0

    

    print(max(tarr))

1

10 reads

fb logo with python turtle, from turtle import *

speed(10)

color("#0270d6")

Screen().bgcolor("yellow")

penup()

goto(0, 150)

pendown()

begin_fill()

forward(150)

circle(-50, 90)

forward(300)

circle(-50, 90)

forward(300)

circle(-50, 90)

forward(300)

circle(-50, 90)

forward(150)

end_fill()

color("white")

penup()

goto(140, 80)

pendown()

begin_fill()

right(180)

forward(50)

circle(80, 90)

forward(50)

right(90)

forward(80)

left(90)

forward(40)

left(90)

forward(80)

right(90)

forward(160)

left(90)

forward(55)

left(90)

forward(160)

right(90)

forward(70)

left(80)

forward(45)

left(100)

forward(80)

right(90)

forward(40)

circle(-40, 90)

forward(40)

left(90)

forward(45)

end_fill()

hideturtle()

done()

1

1 read

IDEAS CURATED BY

anivana

Improve the process

CURATOR'S NOTE

I will be collecting artful code on python here, it's in a nascent stage but hope it becomes awesome with time

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates