[Solved] Why does my if else in this code doesn’t work? are we can not put if else inside another looping or is just my laptop that doesn’t work? [closed]

Why does my if else in this code doesn’t work? are we can not put if else inside another looping or is just my laptop that doesn’t work? [closed] solved Why does my if else in this code doesn’t work? are we can not put if else inside another looping or is just my laptop … Read more

[Solved] JOINning two List-of-Lists to one [closed]

Just use Pandas to convert your lists (income and Expenses) into Dataframes, merge them (in this case it’s basically an inner join on Year and Month) and then convert the Dataframe you get into a list of lists. df1 = pd.DataFrame(income, columns=[“Year”, “Month”, “X”]) df2 = pd.DataFrame(Expenses, columns=[“Year”, “Month”, “Y”]) joined = df1.merge(df2, on=[“Year”, “Month”]).values.tolist() … Read more

[Solved] in the c++ hacker rank preperation cause, the last index returns 0 when i reverse it. but when i try the code out in visual studio, it works perfectly [closed]

As mentioned in the comments, array should be initialized with a proper capacity. You should first read the size and then create the array. #include <iostream> using namespace std; int main() { int n; // First read the array size and then create the array. cin>>n; //inputting the array size int array[n]; //inputting the numbers … Read more

[Solved] Python – ” AttributeError: ‘str’ object has no attribute ‘Tc’ (Tc is one of the arguments) [closed]

It’s here: def preos(molecule, T, P, plotcubic=True, printresults=True): Tr = T / molecule.Tc # reduced temperature … preos(“methane”, 160, 10, “true”, “true”) You’re clearly passing “methane” into the preos function as a string, then trying to call .Tc on that string. The error is saying exactly that. This doesn’t have anything to do with IPython. … Read more

[Solved] Can anyone help me with this javascript?

change this : var (window.open(all)); to : window.open(all); Final code : <html> <head> <script> function myFunction() { var user=prompt(‘Your cpanel.cuccfree.com user’,”); var web=prompt(‘Your cpanel domainname’,’example’); var web2=prompt(‘Your cpanel domaintype (.com/.net/..)’,’cu.cc’); var url = “https://ifastnet.com/portal/cart.php?a=add&pid=89&configoption[193]=”; var url2 = “.472656&sld=”; var url3 = “&tld=”; var url4 = “&domainoption=owndomain”; var all = url + user + url2 + … Read more

[Solved] Find if two lines in 3D are collinear [closed]

Two lines are collinear if scalar multiplication of two vectors equals absolute value of a multiplication their length (it works in 3D). Simply write a method that calculate scalar multiplication private double scalarMultiply(Vector L1, Vector L2) { return L1.X()*L2.X() + L1.Y()*L2.Y() + L1.Z()*L2.Z(); } and length of vectors vectorMod = System.Math.Sqrt(x * x + y … Read more