Шукаєте відповіді та рішення тестів для L15.2025 - Data Modelling (2025/2026)? Перегляньте нашу велику колекцію перевірених відповідей для L15.2025 - Data Modelling (2025/2026) в moodle.lisboa.ucp.pt.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
Suppose you want to write a sub to calculate the commission rate of a sales employee based on the sales amount. If the sales amount is greater than 10,000 Euros, the commission rate is 7%. If the sales amount is smaller than or equal to 10, 000 Euros but greater than 5,000, then the commission rate is 5%. Otherwise, the commission rate is 3%. Which of the following code blocks can be inputted in the space in below sub (where red box is) to calculate the commission rate (multiple answers can be selected)?
[Expected time to answer: 3 mins]
Given the spreadsheet setup shown below, what is the value of x after the following line of code is executed?
x=Selection.Cells(2,3).Value
Write a function named “sumSquares”, that takes a positive integer and calculates the sum of the squares of all integers from 1 to
That is, the function should calculate:
For example, if a user inputs =sumSquares(3) into a cell, the result should be 14 (
[Expected time to answer: 12 mins]
What will be the value of the variable “sellingPrice” displayed in the message box when the sub below is run?
[Expected time to answer: 2 mins]
Assume that the flowchart segment below is correctly implemented on VBA. Select the answers below (you can select more than one).
The following VBA procedure is intended to calculate and display the average of three test scores entered by the user. Identify all the errors (syntax or logic) and write the correct versions so that the program works as intended.
[Expected time to answer: 5 mins]
Write a subroutine named “TaxCalculator” to:
(A) Ask the user for the unit price of a product, the quantity purchased (which must be a whole amount, such as 5, 12, 30), the tax rate (as a percentage, taking values from 0 to 100) with an input box.
(B) Calculate:
gross total = unit price x quantity purchased
tax amount = gross total x tax rate / 100
(C) Display gross total in cell A1 and tax amount in cell A2 of the active worksheet.
Make sure to include “Option Explicit” statement before the sub.
Consider the code below. What will be the value of x and y when for-next loop ends?
[Expected time to answer: 3 mins]
Which of the code segments correctly represents the flowchart segment shown below?
[Expected time to answer: 3 mins]
Evaluate each expression and select all options that correctly state its return value. You can use the table below to check some functions' syntax and explanation.
Function Syntax
|
Explanation
|
Int(number)
|
Returns the integer part of a number.
|
Round( expression [,number of decimal places]
|
Rounds a number to a specified number of decimal places.
|
Sqr(number)
|
Returns the square root of a number.
|
Rnd()
|
Generates a random number less than 1 but greater than or equal to zero.
|
Val(String)
|
Extracts the numeric value at the beginning of a string, ignoring any subsequent non-numeric characters.
|
Abs(number)
|
Returns the absolute value of a number.
|
InStr( [,start], string1, string2)
|
Returns the position of the first occurrence of is the starting position of the search. If omitted, search begins at the first character.
|
InStrRev( string1, string2, [,start])
|
Returns the position of the last occurrence of is the starting position of the search. If omitted, search begins at the last character.
|
Format( expression, format
|
Formats a value (like a date or number) into a specified text string.
|
[Expected time to answer: 2 mins]