Skip to content
  • Home
  • Contact Us
  • About Us
  • Privacy Policy
  • DMCA
  • Linkedin
  • Pinterest
  • Facebook
thecscience

TheCScience

TheCScience is a blog that publishes daily tutorials and guides on engineering subjects and everything that related to computer science and technology

  • Home
  • Human values
  • Microprocessor
  • Digital communication
  • Networking
  • Toggle search form

Category: coding problems

HackerRank Symmetric Difference in python problem solution

In this HackerRank Symmetric Difference problem solution, you are Given 2 sets of integers, M and N, print their symmetric difference in ascending order. The term symmetric difference indicates those values that exist in either M or N but do not exist in both. HackerRank Symmetric Difference problem solution import fractions#Use these to get paramsn…

Read More “HackerRank Symmetric Difference in python problem solution” »

coding problems

HackerRank Collections.OrderedDict() in python problem solution

In this HackerRank Collections.OrderedDict() problem solution you are the manager of the supermarket. and you have a list of N items together with their prices that consumers bought on a particular day. and your task is to print each item name and net price in order of it’s first occurrence. HackerRank Collections.OrderedDict() problem solution #…

Read More “HackerRank Collections.OrderedDict() in python problem solution” »

coding problems

HackerRank No Idea! in python problem solution

In this HackerRank No Idea! problem solution There is an array of n integers. There are also 2 disjoint sets, A and B, each containing m integers. You like all the integers in set A and dislike all the integers in set B. Your initial happiness is 0. For each i integer in the array,…

Read More “HackerRank No Idea! in python problem solution” »

coding problems

HackerRank Find Angle MBC in python problem solution

In this HackerRank Find Angle MBC problem solution ABC is a right triangle, at B. and point M is the midpoint of the hypotenuse AC. and we have given the lengths AB and BC. and our task is to find MBC angle in degrees. HackerRank Find Angle MBC problem solution # -*- coding: UTF-8 -*-import…

Read More “HackerRank Find Angle MBC in python problem solution” »

coding problems

HackerRank Time Delta in python problem solution

In this HackerRank Time Delta problem solution When users post an update on social media,such as a URL, image, status update etc., other users in their network are able to view this new post on their news feed. Users can also see exactly when the post was published, i.e, how many hours, minutes or seconds…

Read More “HackerRank Time Delta in python problem solution” »

coding problems

HackerRank Collections.namedtuple() in python problem solution

In this HackerRank Collections, namedtuple () problem solution Dr. John Wesley has a spreadsheet containing a list of student’s IDs, marks, class, and names. Our task is to help Dr. Wesley calculate the average marks of the students. HackerRank Collections.namedtuple() problem solution # Enter your code here. Read input from STDIN. Print output to STDOUTfrom…

Read More “HackerRank Collections.namedtuple() in python problem solution” »

coding problems

HackerRank Exceptions in python problem solution

In this HackerRank Exceptions problem solution, we have given two values a and b. and we need to perform integer division and print a/b. HackerRank Exceptions problem solution # Enter your code here. Read input from STDIN. Print output to STDOUTT = int(raw_input())for i in range(T): try: a, b = map(int, raw_input().rstrip().split(” “)) print a…

Read More “HackerRank Exceptions in python problem solution” »

coding problems

HackerRank Calendar Module in python problem solution

In this HackerRank Calendar Module problem solution, we have given data and our task is to find what the day is on that date. HackerRank Calendar Module problem solution in python. import calendarmonth, day, year = map(int, raw_input().split())day = calendar.weekday(year,month,day)if day == 0: print “MONDAY”elif day == 1: print “TUESDAY” elif day == 2: print…

Read More “HackerRank Calendar Module in python problem solution” »

coding problems

HackerRank DefaultDict Tutorial in python problem solution

In this HackerRank DefaultDict Tutorial problem solution, you will be given 2 integers, n, and m. There are m words, which might repeat, in word group A., There are m words belonging to word group B. For each m word, check whether the word has appeared in group A or not. Print the indices of…

Read More “HackerRank DefaultDict Tutorial in python problem solution” »

coding problems

HackerRank Introduction to Sets in python problem solution

In this HakerRank Introduction to Sets problem solution, we have given an array of integers and we need to count the average of distinct values of the array and round it to 3 places after the decimal. HackerRank Introduction to Sets solution. # Enter your code here. Read input from STDIN. Print output to STDOUTN…

Read More “HackerRank Introduction to Sets in python problem solution” »

coding problems

HackerRank itertools.permutations() in python problem solution

In this HakerRank itertools.permutations() problem solution, we have given a string s. and we need to print all possible permutations of size k of the string in lexicographically sorted order. HackerRank itertools.permutations() in python problem solution. # Enter your code here. Read input from STDIN. Print output to STDOUTfrom itertools import permutationsargs = [x for…

Read More “HackerRank itertools.permutations() in python problem solution” »

coding problems

HackerRank Polar Coordinates in python problem solution

In this HakerRank Polar Coordinates problem solution, we have given a complex number and we need to convert it to the polar coordinates. HackerRank Polar Coordinate solution. import cmathc = complex(input())print(abs(c))print(cmath.phase(c)) Second Solution # Enter your code here. Read input from STDIN. Print output to STDOUTimport cmathz=complex(raw_input())print ‘{0:.3f}’.format(cmath.polar(z)[0])print ‘{0:.3f}’.format(cmath.polar(z)[1])

coding problems

Posts navigation

Previous 1 … 115 116 117 … 123 Next

Copyright © 2023 TheCScience.

Powered by PressBook Grid Blogs theme