Uncategorized
Home > Uncategorized (Page 25)
Posted at 17:56h
in
Uncategorized
by admin
Question:
You are given an array of strings words and a string chars.
A string is good if it can be formed by characters from chars (each character can only be used once).
Return the sum of lengths of all good strings in words.
Example 1:
Input: words = ["cat","bt","hat","tree"],...
Posted at 17:46h
in
Uncategorized
by admin
Notes: It is optional to do the homework form 6 – 8 if you are blow grade 5
Question 1
Make a variable and assign a number to it (any number you like). Then display your variable using print.
Question 2
Modify your variable, either by replacing the old value with a...
Posted at 16:34h
in
Uncategorized
by admin
Question:
Given an array and a separation Index as below:
Arr: [1,3,5,7,9,15,4,8,12,13]
Separation Index: 6
All the numbers before the seperationIndex arr[0...
Posted at 00:16h
in
Uncategorized
by admin
Question:
One morning, completely by chance, Mirko found a positive integer N in the middle of the street. Since Mirko adores the number 30, he wants to know the maximum multiple of the number 30 that can be obtained by shuffling the digits of the number...
Posted at 00:11h
in
Uncategorized
by admin
Question:One morning, completely by chance, Mirko found a positive integer N in the middle of the street. Since Mirko adores the number 30, he wants to know the maximum multiple of the number 30 that can be obtained by shuffling the digits of the number...
Posted at 02:49h
in
Uncategorized
by admin
Question 1:(please use function that return a value)
Write a program to display information to a driver based on his/her speed according to the following table:
km/h over the limit
Fine
1 to 20
$100
21 to 30
$270
31 or above
$500
Sample Input 1:
Enter the speed limit: 40
Enter the recorded speed of the...
Posted at 02:46h
in
Uncategorized
by admin
Question 1:Use recursion to write a function has_digit that consumes a string and produces True if the string contains a digit (0 through 9) and False otherwise.
Hints:
Make sure that you have a base case.
Make sure to use the function on a shorter string.
Before calling the function, first check to see...
Posted at 02:42h
in
Uncategorized
by admin
Question:
You are in charge of adding cheese topping to a pizza prepared for a special customer. This pizza is a very long rectangular strip. It is divided into N slices, numbered 1 to N from left to right. To add cheese topping to the pizza, you have a special...
Posted at 02:25h
in
Uncategorized
by admin
Question:You are in charge of adding cheese topping to a pizza prepared for a special customer. This pizza is a very long rectangular strip. It is divided into N slices, numbered 1 to N from left to right. To add cheese topping to the pizza,...
Posted at 03:34h
in
Uncategorized
by admin
Question 1:
Santa Claus is playing card game with his reindeer to decide which route he’s going to take to send out the gifts. He is going to play six games. There are no ties. The gift route will be decided based on the results of...