Code Monkey home page Code Monkey logo

akashkobal / hackerrank-python-sloution Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 8.0 187 KB

This compilation of GitHub repositories provides extensive solutions to HackerRank challenges, catering to Python programmers of varying skill levels. 115 HackerRank Challenges, Python Domain Challenges, Competitive Programming Exercises, 30 Days of Code Challenges, Comprehensive Resource.

Home Page: https://theakash.co.in

License: Mozilla Public License 2.0

coding-challenge coding-interviews dsa hackerrank hackerrank-solutions hackerrank-solutions-python interview-preparation interview-questions python python-hackerrank python-hackerrank-solutions algorithms code-challenge coding problem-solving programming python-programming software-development tech

hackerrank-python-sloution's Introduction

hackerrank-python-sloution

Say "Hello, World!" With Python

alt text

print("Hello, World!")  

Python If-Else

alt text

import math
import os
import random
import re
import sys

if __name__ == '__main__':
    n = int(input().strip())
if n % 2 != 0:  
    print("Weird")  
elif n in range(2, 6):  
    print("Not Weird")  
elif n in range(6, 21):  
    print("Weird")  
else:  
    print("Not Weird") 

Array reverse

alt text

import math
import os
import random
import re
import sys

#
# Complete the 'reverseArray' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts INTEGER_ARRAY a as parameter.
#

def reverseArray(a):
    ra = a[::-1]
    return ra
    # Write your code here

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    arr_count = int(input().strip())

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

    res = reverseArray(arr)

    fptr.write(' '.join(map(str, res)))
    fptr.write('\n')

    fptr.close() 

hackerrank-python-sloution's People

Contributors

akashkobal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hackerrank-python-sloution's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.