[Solved] the error is ‘int’ object is not iterable, I am working on a small project in python that allows the user to input ten names and ten ages of students [closed]

[ad_1] for element in range(10): … input_ages = int(input(“\t\t\t\t\tNow please input their ages as well: “)) team_leader = max(input_ages) input_ages is a single integer that gets reassigned each loop iteration. max(input_ages) expects input_ages to be a list for which to find the maximum value by iterating over it. Therefore you get ‘int’ object is not … Read more

[Solved] How to split string in list [closed]

[ad_1] You should know there are two nested list, so there should be two nested for loop to iterate the list. And you should use another for loop to iterate the split() result. The code may be like this: lines = [[‘Name0, Location0’, ‘Phone number0’], [‘Name1, Location1’, ‘Phone number1’]] result = [] for line in … Read more

[Solved] Fetching specific dict values via Python script/code

[ad_1] You have dictionary with list so you will need for-loop (or indexes ie. [0]) to get values. And because you have nested dictionares so you will have to use all keys to get nested value. data = {‘Response’: {‘effective-configuration’: {‘default-zone-access’: 1, ‘cfg-action’: 0, ‘db-max’: 1045274, ‘db-avail’: 1041908, ‘db-committed’: 1268, ‘db-transaction’: 0, ‘db-chassis-wide-committed’: 2280, ‘transaction-token’: … Read more

[Solved] Google Sheets: How to make a macro/script that, for all selected rows, inserts two rows beneath, then copies and pastes the content from the original?

[ad_1] Google Sheets: How to make a macro/script that, for all selected rows, inserts two rows beneath, then copies and pastes the content from the original? [ad_2] solved Google Sheets: How to make a macro/script that, for all selected rows, inserts two rows beneath, then copies and pastes the content from the original?

[Solved] Android AlertDialog wont came out for instance [closed]

[ad_1] Your class TestActivity must extend AppCompatActivity class so that the onCreate method could be overriden. Your class isn’t using Inheritance or Interface Implementation, that’s why @Override annotation is throwing error. public class TestActivity extends AppCompatActivity Second, your code for showing Toast is wrong. This is how you can fix that. Toast.makeText(this, id+”/”+pass, Toast.LENGTH_SHORT).show(); Third, … Read more

[Solved] Find the top 30% of the industry’s revenue in the past 12 months through SQL [closed]

[ad_1] This Query will definitely help you SELECT A.*, P.30_PERCENT_REVENUE FROM STACK_USER.revenue AS A JOIN (SELECT TRIM(B.industry_category) AS industry_category, (((SELECT SUM(REVENUE) FROM STACK_USER.revenue WHERE industry_category=B.industry_category)/100) *30) AS 30_PERCENT_REVENUE FROM STACK_USER.revenue AS B GROUP BY B.industry_category AND MONTH(DATE)>=MONTH(SYSDATE()) AND YEAR(DATE)>=YEAR(SYSDATE())-1) AS P ON TRIM(A.industry_category)=P.industry_category AND A.revenue>=P.30_PERCENT_REVENUE; I was very confused by your question because the question … Read more