Programming does not always happen smoothly, sometimes a lot of patience, devotion and perseverance are required to solve **programming problems** and stumbling blocks on your way of creating a new programming solution.While developing an application you might come across a number of **programming questions** the answers to which are not easy to be found. To spare yourself the trouble, submit your programming questions here and you will get **programming answers** within the shortest time period.

### Ask Your question

### Search & Filtering

SQL Group By

A sql-6-9.sql file has been opened for you.

Write each of the following tasks as a SQL statement in a new line (remember that you can source the file to compare the output reference):

Use the e_store database

Join the products and the reviews tables that would output this:

----+------------+-----------+

| id | name | avg_stars |

+----+------------+-----------+

| 2 | Smartphone | 2.3333 |

| 3 | PC | 3.0000 |

+----+------------+-----------+

2 rows in set (0.01 sec)

A sql-6-9.sql file has been opened for you.

Write each of the following tasks as a SQL statement in a new line (remember that you can source the file to compare the output reference):

Use the e_store database

Join the products and the reviews tables that would output this:

----+------------+-----------+

| id | name | avg_stars |

+----+------------+-----------+

| 2 | Smartphone | 2.3333 |

| 3 | PC | 3.0000 |

+----+------------+-----------+

2 rows in set (0.01 sec)

Use the e_store database

Get the average rating of product_id 4. Alias the average result as: avg_rating.

The result should look like this:

+----+------------+

| id | avg_rating |

+----+------------+

| 4 | 3.5000 |

+----+------------+

1 row in set (0.08 sec)

Write a program to calculate and display the cost of a number of cinema tickets according to the rules:

RM8 per ticket for the stalls (at the front, rows 1 to 10)

RM10 per ticket for the gallery (the best seats, rows 11 to 25)

RM6 per ticket for the upper gallery (far from the screen, rows 26 to 30)

The customer enters two whole numbers, row (the row number) and tickets (the number of tickets required) and the program should calculate and display the cost of that number of tickets for the customer.

RM8 per ticket for the stalls (at the front, rows 1 to 10)

RM10 per ticket for the gallery (the best seats, rows 11 to 25)

RM6 per ticket for the upper gallery (far from the screen, rows 26 to 30)

The customer enters two whole numbers, row (the row number) and tickets (the number of tickets required) and the program should calculate and display the cost of that number of tickets for the customer.

How does Cluster Size affect the efficiency of the File System?

What affect do you think a heavily fragmented disk has on the performance of Sequential and Random access methods?

Why do you want a File System to cache file data in memory? What are the downsides to caching File data?

Of the following statements, which ones can be said to be TRUE?

1. The time complexity of all single statements is constant

2. According to the Big O Notation, the time complexity of some statements can be said to be logarithmic

3. Time complexity can only be expressed by using the Big O notation

4. Time complexity can be expressed as a differential equation

5. The time complexity of an algorithm can vary over time

6. Quadratic time complexity can be expressed as a quadratic equation

a) 1, 3 & 5

b) 2 & 4

c) 5, 2 & 6

d) 2 & 6

e) 2, 4 & 6

1. The time complexity of all single statements is constant

2. According to the Big O Notation, the time complexity of some statements can be said to be logarithmic

3. Time complexity can only be expressed by using the Big O notation

4. Time complexity can be expressed as a differential equation

5. The time complexity of an algorithm can vary over time

6. Quadratic time complexity can be expressed as a quadratic equation

a) 1, 3 & 5

b) 2 & 4

c) 5, 2 & 6

d) 2 & 6

e) 2, 4 & 6

Write a program that uses the keys(), values(), and/or items() dict methods to find statistics about the student_grades dictionary. Find the following:

Print the name and grade percentage of the student with the highest total of points

Find the average score of each assignment.

Find and apply a curve to each student's total score, such that the best student has 100% of the total points.

student_grades = {

'Andrew': [56, 79, 90, 22, 50],

'Colin': [88, 62, 68, 75, 78],

'Alan': [95, 88, 92, 85, 85],

'Mary': [76, 88, 85, 82, 90],

'Tricia': [99, 92, 95, 89, 99]

}

Print the name and grade percentage of the student with the highest total of points

Find the average score of each assignment.

Find and apply a curve to each student's total score, such that the best student has 100% of the total points.

student_grades = {

'Andrew': [56, 79, 90, 22, 50],

'Colin': [88, 62, 68, 75, 78],

'Alan': [95, 88, 92, 85, 85],

'Mary': [76, 88, 85, 82, 90],

'Tricia': [99, 92, 95, 89, 99]

}

Q. 1: Implement the following function:

surround(char * str, char c)

The first argument is a pointer to a string, whereas the second argument is a

character. When the function returns, the string pointed to by str should be

surrounded by the character in variable c. For instance, if str points to “this”,

and c is ‘X’, then after the function returns, str should point to “XthisX”.

surround(char * str, char c)

The first argument is a pointer to a string, whereas the second argument is a

character. When the function returns, the string pointed to by str should be

surrounded by the character in variable c. For instance, if str points to “this”,

and c is ‘X’, then after the function returns, str should point to “XthisX”.

I need to edit this script to display the dialogue box with message: "I like Computer Programming C++ C++!"

It currently displays "I like unicorns robots peanut butter loops very!!!!! very!!!!! very!!!!! very!!!!! very!!!!! much!"

It currently displays "I like unicorns robots peanut butter loops very!!!!! very!!!!! very!!!!! very!!!!! very!!!!! much!"