Answer:
def filter_strings(data_list):
string_list = []
for s in data_list:
if type(s) == str and len(s) > 5:
string_list.append(s)
return string_list
Explanation:
Create a function called filter_strings that takes data_list as a parameter
Initialize a new list to hold the strings that are longer than 5 characters
Initialize a for loop that iterates through the data_list
Check the elements if they are string - use type function, and if their length is greater than 5 - use len function. If an element satisfies the both conditions, put it to the string_list
When the loop is done, return the string_list
Data.......;...............;.........;......;.
Answer:
System.out.println("Enter length:");
Scanner scan = new Scanner(System.in);
Double x = scan.nextDouble();
System.out.println("Enter 2 lengths:");
Double a = scan.nextDouble();
Double b = scan.nextDouble();
Rectangle rect = new Rectangle(x);
Rectangle rect2 = new Rectangle (a,b);
if (rect2.equals(rect)){
System.out.print("Congruent Rectangles");
}
else {
System.out.print("Different Rectangles");
}
}
}
Explanation:
(Ctrl + V) is the shortcut for pasting.
Similarly, (Ctrl + C) is the shortcut for copying.
Answer:
Select and group the table with the DeptName and sum the credits field from the Design Ribbon tab, click the Totals button, then click the credits field's total row, expand the Total row's Group by list, and select the Sum option and then click run.
Explanation:
Microsoft Access is a relational database platform developed by Microsoft. It is used to create a database for storing data and a means of querying the data from storage.
The result of the query can be a grouped dataset, grouping a column by the aggregate of another column. The dataset above is queried to return the grouped DeptName by the aggregate of the sum of the credits field.