I am writing a function to find the definite integral of any function by using the Midpoint method, the output of this function must be a scalar value, where y(
I have a large data frame in a panel structure (201720 rows; 3 columns) which looks as follows: Name <- c("A", "A", "A", "B", "B", "B") Inception <- c(as
I am trying to create a dataframe for Sankey chart in Power BI which needs source and destination like this. id Source Destination 1 Starting a next point b 1
I try to process data from an excel file from several sheets (~200). Luckily the data is always at the same position in each sheet. I wrote the following code f
I made a function that takes a dataframe as argument, and creates two dataframes in output according to a threshold value of one of the columns. These 2 output
I'm a bit stuck because I've already written those functions in Java and they work properly, and then, when "converted" to python, they didn't work as expected.
I defined a function creates 3 random numbers from 1 to 36, and I allowed repetition. I want to test how many times I can get three same numbers in one hand in
I am trying to make a script (and a loop) to extract matching lines to print them into a new file. There are 2 conditions: 1st is that I need to print the value
I am trying to write a for loop in r to convert multiple variables with similar character pattern in r to as.factor. Below is the function I wrote, R runs the c
In my application I have saved the data when we click on it(we can add the multiple data by entering some data and save the multiple data by clicking the save b
I created two variables that give the amount of words in a given context that are both positive and negative respectively within a couple of years. The followin
I'm doing a coding exercise and it's to build a password generator. I understand I need to utilize the for loop with the list containing the elements but I'm ha
I am struggling with an issue concerned with nested for loops and calculation with conditions. Let's say I have a data frame like this: df = data.frame("a" = c(
I am trying to run this command but need to insert new two variables for every time I run this command. I think the right approach is to loop through a dictiona
I'm having a problem with my nested loop. I have a list of titles and a list of keywords, and I want to create a new list containing all of the titles that cont
I have a dict with two strings "Candy-one" and "Candy-two" as the key and Capacity as the key pair. I wish to replace the strings "Candy-one" and "Candy-two" wi
I have an array of objects containing a field duration that specifies the duration that the Object should stay visible. Each Object of array has it's own durati
This is a part of the code that checks the notice that appears while working using pyautogui and resumes the work when it disappears. Capture the guide and make
I have troubles in using for loops in Python. I wrote this code: x=5 people=['Mary','Joe'] genders=['she','he'] for person in people: print(person) for
This code has to copy one array to another via void copy function. But I don't understand why it doesn't work. #include <stdio.h> void copy(int func_arra