65.0k views
3 votes
In the program below, what is the value of Credit if Country is 'au'?

data ;
set ;
if Country='US' then Credit=300;
else if Country='AU' then Credit=500;
else Credit=0;
run;

a. 300
b. 500
c. 0
d. missing

User HelpNeeder
by
8.5k points

1 Answer

3 votes

Final answer:

The value of Credit will be 0 if Country is 'au' because the conditions in the SAS program are case-sensitive, and 'au' does not match 'AU' in the condition check.

Step-by-step explanation:

In the given program, if the value of Country is 'au', the value of Credit will be 0. This is because the conditions in the program are case-sensitive.

The program checks for 'US' in uppercase letters and 'AU' in uppercase letters. Since 'au' is in lowercase and does not match 'AU', the condition fails and does not assign the value of 500 to Credit. Instead, the else part of the conditional is executed, which assigns the value of 0 to Credit.

User Saurabh Kukade
by
8.6k points