Skip to content

Tag: python

Comparing Two Functions for Recursive Digit Sum

I’m stumped as to why my solution for the Recursive Digit Sum question on HackerRank is being rejected. Background The question: For an input of string n and integer k, the number h is created by concatenating n “k” times. Find the “super digit” of h by recursively summing the in…

How to add my own parameters into pymongo find function

Im building a python application that allows you to query data from mongoDB based on the start time and end time that the user puts in. I have been able to connect to mongoDB and put data there. I just cant seem to get the query right. I will show only the function in question because I know that connecting

Change date format of these string using Python

I have a string from a pdf that I want to transform it to the date format that I want to work with later, the string is 05Dec22 how can I change it to 12/05/2022? This is what i tried so far Answer If you execute the code you’ll get the following error, this is because your time string is