Question

printRectanglePerimeter(3, 4);

printRectanglePerimeter(3, 4);

Homework Answers

Answer #1

PYTHON

def printRectangle(x,y): #define function
    perimeter=2*(x+y)    
    print(perimeter)
printRectangle(3,4) #function call

JAVA

class Prectangle
{
  static void printRectangle(double x,double y)
  {
    double perimeter;
    perimeter=2*(x+y);
    System.out.println("Perimeter="+perimeter);
  }

public static void main(String[] args) {
  printRectangle(3,4);

}
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
[4 5 5 2 4 4 6 3 3 7 5 3 6 3 4 4...
[4 5 5 2 4 4 6 3 3 7 5 3 6 3 4 4 6 5 4 5 3 7 5 5 4 2 6 5 6 6] This is my dataset Average number of coronavirus patients received in Neftchilar Hospital per hour is equal to the sum of the first 3 values in your dataset. Find the probability that the number of patients received in any 30 minutes interval will be at least 2?
[4 5 5 2 4 4 6 3 3 7 5 3 6 3 4 4...
[4 5 5 2 4 4 6 3 3 7 5 3 6 3 4 4 6 5 4 5 3 7 5 5 4 2 6 5 6 6] dataset. As you can see Y is a discrete variable. Please write down a probability mass function for Y. Remember the example of pmf for die rolling experiment;
[4 5 5 2 4 4 6 3 3 7 5 3 6 3 4 4...
[4 5 5 2 4 4 6 3 3 7 5 3 6 3 4 4 6 5 4 5 3 7 5 5 4 2 6 5 6 6] This is my dataset The time between the patient arrivals is exponentially distributed with mean equal to sum of the first 3 values in your dataset. What is the probability that the time between patient arrivals will be less that 10 minutes? Use the material in chapter 6. Find the...
Which of these fractions is the multiplicative inverse of 3/4? 1. 4/3 2. - 4/3 3....
Which of these fractions is the multiplicative inverse of 3/4? 1. 4/3 2. - 4/3 3. - 3/4 4. None of the above Which of the following statements is FALSE? 1. a. a/c + b/c = (a + b)/c 2. b. a/c - b/c = (a - b)/c 3. c. (a/c) ÷ (b/c) = a/b, (b ? 0) 4.d. None of the above If three-fifths of the students in a class are female and 12 students are male, then what...
Show that the matrix is not diagonalizable. 3 −4 3 0 3 3 0 0 4...
Show that the matrix is not diagonalizable. 3 −4 3 0 3 3 0 0 4 Find the eigenvectors x1 and x2 corresponding to λ1 and λ2, respectively. x1 = x2 =
The next two questions relate to the data below: 0, 3, 3, 3, 4, 4, 4,...
The next two questions relate to the data below: 0, 3, 3, 3, 4, 4, 4, 6, 9, 11, 18, 21, 23, 25, 30, 36, 46, 47, 66, 90 The median and quartiles (Q1, M, Q3) of the data set are: (quartiles calculated as per lecture slides!) a 4, 11, 36 b 4.5, 18, 34.5 c 4.25, 14.5, 34.75 d 4, 14.5, 34.5 e 4, 14.5, 36
If the matrix A is 4×2, B is 3×4, C is 2×4, D is 4×3, and...
If the matrix A is 4×2, B is 3×4, C is 2×4, D is 4×3, and E is 2×5, what are the dimensions of the following expressions a) A^TD + CB^T b) (B + D^T ) A c) CA + CB^T
Find any relative extrema ?(?) = 3?^4 − 2?^3 + 4
Find any relative extrema ?(?) = 3?^4 − 2?^3 + 4
Consider the vector field ?(?,?,?)=(3?+3?)?+(4?+3?)?+(4?+3?)?. a) Find a function ? such that ?=∇? and ?(0,0,0)=0. ?(?,?,?)=  ...
Consider the vector field ?(?,?,?)=(3?+3?)?+(4?+3?)?+(4?+3?)?. a) Find a function ? such that ?=∇? and ?(0,0,0)=0. ?(?,?,?)=   b) Suppose C is any curve from (0,0,0) to (1,1,1). Use part a) to compute the line integral ∫C ?⋅??
QUESTION 17 If A = { 1, 2, 3, 4 }    B = {  3, 4, 5...
QUESTION 17 If A = { 1, 2, 3, 4 }    B = {  3, 4, 5 }   C = { 5, 7, 8, 9 } then A ∩   C U  B  equals { 3, 5 } { 3, 4, 5 } { 4, 5 } None of the above QUESTION 19 What is the Cartesian product A x B given  A = {1, 2} and B = {a, b}? { (1, a), (1, b), (2, a), (b, b) (a, a)} { (1, 1), (2, 2),...