Skip to content

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.

License

Notifications You must be signed in to change notification settings

AkashKobal/hackerrank-python-sloution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

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() 

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published