1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Romashka [77]
3 years ago
13

1. Create an anonymous block that will count the number of students whose gr_t1 grade is higher than the average on gr_t1 and di

splay that number. Test the program
Computers and Technology
1 answer:
sweet [91]3 years ago
4 0

Answer:

The Anonymous Block will be:

 1 DECLARE

 2  

 3  lv_grade_row grade%rowtype;

 4  lv_gr_avg grade.gr_t1%type;

 5  lv_std_name varchar2(80);

 6  cursor cursor_grade is select * from grade;

 7

 8  BEGIN

 9

10  select avg(gr_t1) INTO lv_gr_avg from grade;

11  open cursor_grade;

12  fetch cursor_grade INTO lv_grade_row;

13

14  while cursor_grade%found loop

15

16  if

17  lv_grade_row.gr_t1>lv_gr_avg then lv_std_name :=  

lv_grade_row.std_fname|| ' ' ||lv_grade_row.std_lname|| ' ' ||

lv_grade_row.gr_t1;

18  dbms_output.put_line(lv_std_name);

19

20  end if;

21  fetch cursor_grade into lv_grade_row;

22

Explanation:

You might be interested in
Suppose that outFileis an ofstreamvariable and output is to be stored in the file outputData.out. Which of the following stateme
BlackZzzverrR [31]

Answer:

Option b outFile.open("outputData.out");

Explanation:

In C++, there are several classes given to handle output and input of characters to or from files. They are:

  • ofstream that write on files
  • ifstream that read from files

We can use an object of ofstream to hold the contents that we wish to output to an external file. The general syntax is as follows:

           ofstream_obj.open(file_name)

This will create a file with a specific file name and it possesses all the contents from the obstream_obj.

5 0
3 years ago
TRUE OR FALSE - SQL language is used to query data in a Relational Database?
Gelneren [198K]

Answer:

Yes I agree with the other person who answered that

5 0
3 years ago
Write a program with 2 separate functions which compute the GCD (Greatest Common Denominator) and the LCM (Lowest Common Multipl
Maru [420]

Answer:

The program written in Python is as follows

def GCD(num1, num2):

    small = num1

    if num1 > num2:

         small = num2

    for i in range(1, small+1):

         if((num1 % i == 0) and (num2 % i == 0)):

              gcd = i

    print("The GCD is "+ str(gcd))

def LCM(num1,num2):

    big = num2  

    if num1 > num2:

         big = num1

    while(True):

         if((big % num1 == 0) and (big % num2 == 0)):

              lcm = big

              break

         big = big+1

     print("The LCM is "+ str(lcm))

 print("Enter two numbers: ")

num1 = int(input(": "))

num2 = int(input(": "))

GCD(num1, num2)

LCM(num1, num2)

Explanation:

This line defines the GCD function

def GCD(num1, num2):

This line initializes variable small to num1

    small = num1

This line checks if num2 is less than num1, if yes: num2 is assigned to variable small

<em>     if num1 > num2: </em>

<em>          small = num2 </em>

The following iteration determines the GCD of num1 and num2

<em>     for i in range(1, small+1): </em>

<em>          if((num1 % i == 0) and (num2 % i == 0)): </em>

<em>               gcd = i </em>

This line prints the GCD

    print("The GCD is "+ str(gcd))

   

This line defines the LCM function

def LCM(num1,num2):

This line initializes variable big to num2

    big = num2  

This line checks if num1 is greater than num2, if yes: num1 is assigned to variable big

<em>     if num1 > num2: </em>

<em>          big = num1 </em>

The following iteration continues while the LCM has not been gotten.

    while(True):

This if statement determines the LCM using modulo operator

<em>          if((big % num1 == 0) and (big % num2 == 0)): </em>

<em>               lcm = big </em>

<em>               break </em>

<em>          big = big+1 </em>

This line prints the LCM of the two numbers

     print("The LCM is "+ str(lcm))

The main starts here

This line prompts user for two numbers

print("Enter two numbers: ")

The next two lines get user inputs

num1 = int(input(": "))

num2 = int(input(": "))

This calls the GCD function

GCD(num1, num2)

This calls the LCM function

LCM(num1, num2)

<em></em>

<em>See attachment for more structured program</em>

Download txt
5 0
3 years ago
Which of the following describes a Trojan horse?
HACTEHA [7]

Answer:

the answer is

c. Trojan horses enter a secure space, while an infected file proceeds to be downloaded and run.

7 0
3 years ago
If one wanted to use the best method to get storage into long-term memory, one would use _________. maintenance rehearsal rote r
anzhelika [568]

Answer:

elaborative rehearsal

Explanation:

when it comes to storage of information or data into long term memory then elaborative rehearsal plays an important role.

Elaborative rehearsal is a technique which focuses on thinking about the piece of information or data's meaning which is to be stored in long term memory and linking it with the information or data which is already present or stored.

7 0
3 years ago
Other questions:
  • What is a drawback to being in Slide Show mode? a- Being able to review each slide in order
    8·2 answers
  • Why does the hp computer not have Bluetooth?
    6·1 answer
  • manufacturers are making an effort to build energy-efficient computers and use recyclable cases and packaging true or false
    10·1 answer
  • This is an electronic method used to send and receive data–voice, text, images, and video.
    13·2 answers
  • (Complete the Problem-Solving discussion in Word for Programming Challenge 2 on page 404. Your Problem-Solving discussion should
    13·1 answer
  • Which statement describes borders and shading ?
    13·1 answer
  • Identify the layout in which you will be able to view and edit the header and footer
    12·1 answer
  • Complete the sentence to identify advantages of top-down programming design. Choose all that apply.
    15·2 answers
  • Create html code showing heading tags​
    6·1 answer
  • 我对汉语的兴趣 làm đoạn văn theo đề trên​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!