Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akashkobal/hackerrank-python-sloution

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.
https://github.com/akashkobal/hackerrank-python-sloution

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

Last synced: about 2 months ago
JSON representation

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.

Awesome Lists containing this project

README

        

# hackerrank-python-sloution
## Say "Hello, World!" With Python

![alt text](https://github.com/AkashKobal/hackerrank-python-sloution/blob/main/questions/Say%20Hello%2C%20World!%20With%20Python.png)
```python
print("Hello, World!")
```

## Python If-Else

![alt text](https://github.com/AkashKobal/hackerrank-python-sloution/blob/main/questions/Python%20If-Else.png)
```python
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](https://github.com/AkashKobal/hackerrank-python-sloution/blob/main/questions/reverse%20array.png)
```python

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