Skip to content

LokiGadd/Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python

All my python code

S.No File Name Skill Description Hint Difficulty
1 1.py Print function Write a Python HelloWorld code (Sanity check). Hello World!
2 2.py Version print Write a Python program to get the Python version you are using. Print the version using sys module Easy
3 3.py String format Write a Python program to print a string in a specific format. Edited string using \n and \t Easy
4 4.py Date time Write a Python program to display the current date and time. Date and Time Easy
5 5.py User stdin and math module Write a Python program which accepts the radius of a circle from the user and compute the area. Use input() and math.pi Easy
6 6.py String concatination Write a Python program which accepts the user's first and last name and print them in reverse order with a space between them. Easy
7 7.py % modulo to find remainder and conditions Write a Python program to print "YES" if the user input number is even, else print "NO" n%2==0 for even number Easy
8 8.py Functions Write a Python program to convert the given string into a morse code. Morse code from internet Easy
9 9.py Array Given a list of numbers and a number k, return whether any two numbers from the list add up to k. Values should be < or = k Easy
10 10.py Array Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i. Easy
11 11.py Array Given an array of time intervals (start, end) for classroom lectures (possibly overlapping), find the minimum number of rooms required. Easy
12 12.py Stack Given a string of round, curly, and square open and closing brackets, return whether the brackets are balanced (well-formed). Use stack Easy
13 13.py String You are given the firstname and lastname of a person on two different lines. Your task is to read them and print the following:Hello firstname lastname! You just delved into python. String concatination Easy
14 14.py Functions and array A fixed point in an array is an element whose value is equal to its index. Given a sorted array of distinct elements, return a fixed point, if one exists. Otherwise, return False. Iteration Easy
15 15.py Dictionary A classroom consists of N students, whose friendships can be represented in an adjacency list.Each student can be placed in a friend group, which can be defined as the transitive closure of that student's friendship relations. In other words, this is the smallest set such that no student in the group has any friends outside this group. List merge Easy
16 16.py Stack On a mysterious island there are creatures known as Quxes which come in three colors: red, green, and blue. One power of the Qux is that if two of them are standing next to each other, they can transform into a single creature of the third color.Given N Quxes standing in a line, determine the smallest number of them remaining after any possible sequence of such transformations. Use stack.pop() Easy
17 17.py Array A girl is walking along an apple orchard with a bag in each hand. She likes to pick apples from each tree as she goes along, but is meticulous about not putting different kinds of apples in the same bag.Given an input describing the types of apples she will pass on her path, in order, determine the length of the longest portion of her path that consists of just two types of apple trees. Easy
18 18.py Sorting and lambda Given the names and grades for each student in a class of N students, store them in a nested list and print the name(s) of any student(s) having the second lowest grade. Use key = lambda for sorting. Easy
19 19.py Conditions Write a Python program for a rock-paper-scissors game. Assign values like ROCK = 0; PAPER = 1; SCISSORS = -1. Easy
20 20.py Anagrams string Given two words consisting of english letters (uppercase and lowercase) determine whether they are anagrams. Use sort() Easy
21 21.py Next Bigger using str() Create a function that takes a positive integer and returns the next bigger number that can be formed by rearranging its digits. Easy
22 22.py Least Larger Given an array of numbers and an index, return the index of the least number larger than the element at the given index, or -1 if there is no such index ( or, where applicable, Nothing or a similarly empty value ). Easy
23 23.py Basic Sequence Practice Complete the function that takes an integer n and returns a list/array of length abs(n) + 1 of the arithmetic series explained above. Whenn < 0 return the sequence with negative terms. Easy
24 24.py Reverser Impliment the reverse function, which takes in input n and reverses it. For instance, reverse(123) should return 321. You should do this without converting the inputted number into a string. Easy
25 25.py Simple string expansion Given a string, return the expansion of that string. Easy
26 26.py Ordered Weights "56 65 74 100 99 68 86 180 90" ordered by numbers weights becomes: "100 180 90 56 65 74 68 86 99". Easy
27 27.py % and // A number m of the form 10x + y is divisible by 7 if and only if x − 2y is divisible by 7. In other words, subtract twice the last digit from the number formed by the remaining digits. Continue to do this until a number known to be divisible or not by 7 is obtained; you can stop when this number has at most 2 digits because you are supposed to know if a number of at most 2 digits is divisible by 7 or not. Easy
28 28.py
29 29.py
30 30.py
31 31.py
32 32.py
33 33.py
34 34.py
35 35.py
36 36.py
37 37.py
38 38.py
39 39.py
40 40.py
41 41.py
42 42.py
43 43.py
44 44.py
45 45.py
46 46.py
47 47.py
48 48.py
49 49.py

About

All my python code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages