Categories

## How to retrieve pre-set value from list call

list_1=[one,two,three,four,five,six,seven,eight,nine] list_a=[list_1[0],list_1[1],list_1[2]] list_b=[list_1[3],list_1[4],list_1[5]] list_c=[list_1[6],list_1[7],list_1[8]] What do I do if I want to find what value of x list_(a,b,c…ect)[list_1[x]] for what I am using this to do, assume all the values in list_1 can be the same value or different values than each other ex. list_1=[one,one,one,two,one,six,seven,three,one]

Categories

## Python list rearrange the elements in a required order

My main list has 44 names as elements. I want to rearrange them in a specific order. I am giving here an example. main_list = [‘one’,’two’,’five’,’six’,……………..’twentyone’,’three’,’four’,’seven’,’eight’,…..,’fortyfour’] I want to rearrange the list. I have no idea how to proceed. But my expected output should like this Expected output: main_list = [‘one’,’two”three’,’four’,,’five’,’six’,’seven’,’eight’……………..’twentyone’,,…..,’fortyfour’]

Categories

## Does converting a pointer to int actually return the location of it in byte or something?

I am new to C++, but I am curious enough to dig into these strange things. I was wondering what happens when I convert a pointer to an int and realized could they indicate something. So I wrote this program to test my ideas as pointers in the same array are close enough in terms […]

Categories

## How to register an account on MozzilaZine?

I need help to Register my account on MozzilaZine,I can’t register because the last step is a question verification that I don’t know how to answer (This is funny, but I can’t). I attached a screenshot of the question. I tried: 7, seven, 8, eight, 9, nine , but no avail. What’s the hack? thanks, […]

Categories

## Python – tuple index out of range, but i dont think it is

If anyone can help it would be greatly appreciated – as can be seen from the code I am just trying to get it to print each ‘card’ out. This code currently prints cards Ace – King of hearts but when changing suits it then runs into tuple index out of range. Very new to […]

Categories

## C++: “free(): invalid pointer” error and core dumped

I am new to C++. I wrote some code to simulate a blackjack game and it runs fine in Eclipse but it also needs to run in Linux, so I am using a virtual machine and g++ to run it but it gives me this error: free(): invalid pointer Aborted (core dumped) I googled it […]

Categories

## question regarding user input of objects and storing them dynamically

Basically my code is supposed to take in money objects such as 2.54, 3.05 and keep going until user types in 0.0. After, it finds the sum of all the objects and finds the median. However, I had an issue during runtime. enter image description here Enter the expenditure record (e.g., \$1.95, coffee, enter 0.0 […]

Categories

## Tkinter in Python, enumerate

I need your help. I want to make a few labels. After clicked, the number on every label should change to a text accordiong to the number. I tried this, but it just changes the text on every label to the last item in the list2. What should I do to make it change accordingly? […]

Categories

## Filter datatable if a column contains any one of the elements in an array

I have a datatable like this ColA ColB 1 OneThree 2 FourTwo 3 EightNine 4 ThreeEightFive 5 SevenNine and the substrings are in another array (“Two”,”Eight”, “Three”) How do i filter the datatable using ColB and get the rows which contains any one of the substrings in the array? Array might have n number of […]