logo

Crowdly

Browser

Add to Chrome

L15.4292 - Data Modelling (2024/2025)

Looking for L15.4292 - Data Modelling (2024/2025) test answers and solutions? Browse our comprehensive collection of verified answers for L15.4292 - Data Modelling (2024/2025) at moodle.lisboa.ucp.pt.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

[Average expected time to solve this question: 12 min]

Function that, given a range representing a matrix with numeric values, returns the column number containing more even values. 

Example:

9651
1382
7451
 2 2 1 3

For this example function should return

2 (second column is the one with more even values)

View this question

[Average expected time to solve this question: 12 min]

Create a function that, given a string, returns the distinct (unique)characters in that string.

Example:

"AVERAGE" --» "AVERG"

View this question

[Average expected time to solve this question: 7 min]

a) Create a function that, given a string, returns the same string with first and last letter swapped.

Example "cats and dogs" ---»"sats and dogc"

b) Create a Sub to ask the user to enter a string and, using the previous function, shows in a message the string with first and last letter swapped.

View this question

[Average expected time to solve this question: 5 min]

Justify if the following expressions are correct in VBA. For correct ones show their type and value.

a) 7 \ -2 \ LEN("OLA")

b) 2 * InStr("JULIETA", "LI") \ 2

c) (9 \ 3) * SQR(4)

d) INT(1+SQR(900E-2)^2)

View this question

[Average expected time to solve this question: 5 min]

Create a Sub to fill sheet1 range "A1:C4"  with words created with 3, "A" to "E", random letters.

Example: (remember results are random)

DCCBCCBCD
CADEEDCBB
BCBAEECEA
BAEBDADDE

View this question

[Average expected time to solve this question: 5 min]

Build a table with the value for all the variables (during the execution of the following code) and mark all outputs.

Sub

Start will be called first. Do it first on paper and then copy it here.

Sub Start()

Dim A As String, B As Integer

B = 5

A = "REVOLUTION"

DoIt B, A

MsgBox A & B

End Sub

Sub DoIt(ByVal X As Integer, ByRef S As String)

Dim SA As String

SA = ""

Do While X >= 1

 If X Mod 2 = 0 Then

  SA = Mid(S, X, 1) & SA

 End If

 X = X - 1

Loop

S = SA

End Sub

View this question

[Average expected time to solve this question: 5 min]

Sub to copy all Column A multiple of 5 values to Column B.

Program should stop when the first empty cell is found in Column A

Example:

ABAB
12before running the code

«-------------------------
1215
15             

1520
20after running the code

-------------------------»
205
7   7 
5   5 
      

View this question

Qual o output do seguinte programa supondo que é inicialmente chamado o procedimento P?

Sub P1(ByRef Y as integer)

Y=Y MOD 10

end sub

Sub P

Dim Y as integer

Y=17

call P1(Y)

call msgbox(Y)

End sub

0%
0%
0%
0%
0%
View this question

Qual o output do seguinte programa supondo que é inicialmente chamado o procedimento P?

Sub P1( ByRef X as string)

X = "CA" & X & "LICA"

end sub

Sub P

dim C as string

C = "TO"

call P1(C)

call msgbox(INSTR(C,"TO"))

end sub

100%
0%
0%
0%
0%
View this question

Qual o output do seguinte programa supondo que é inicialmente chamado o procedimento P?

sub P1(ByVal X as integer, ByRef Y as string)

Y = chr(asc(Y)-X)

end sub

sub P

Dim A as string

A= "D"

call P1(2,A)

call msgbox(asc(A)-asc("A"))

end sub

0%
0%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.lisboa.ucp.pt?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome