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
Bingel [31]
3 years ago
5

Writing of a program to take two integer and print sum and product of them.

Computers and Technology
1 answer:
Bas_tet [7]3 years ago
5 0

Answer:

1.)

def two(a, b) :

print(a+b)

print(a*b)

2.)

a = int(input('enter an integer values '))

b = int(input('Enter another integer value' ))

print(a+b)

print(a*b)

3.)

Take side of a square from user and print area and perimeter of it.

def square(a):

area = a**2

perimeter = 4*a

print(area, perimeter)

Explanation:

Code written in python :

The first function named two, takes to arguments a and b ;

The sum of integers a and b is taken and displayed using ; print(a+b)

The product of integers a and b is taken and displayed using ; print(a*b)

2.)

User can enter an input and converted to an integer value using the command ;

int(input()) ; the sum and product of these values are displayed using :

print(a*b) and print(a+b)

The Area and perimeter of a square requires the side length, which is taken as the argument a in the square function defined.

Area of square = a² = a**2

Perimeter = 4 * a

You might be interested in
Ms. Rogers wants to see the names of all the students who scored below 25 on the test. Which of these custom options will help h
photoshop1234 [79]
B Is less than because it says below

6 0
3 years ago
Write a function ""volCylinder"" that takes twofloats""r""for the radius and ""h""for the height of the cylinder and returnsthe
Mandarinka [93]

Answer:

def volCylinder(r, h):

   return 3.14 * r * r * h;    

radius = float(input("Enter the radius: "))

height = float(input("Enter the height: "))

print("The volume of the cylinder is: "+ str(volCylinder(radius, height)))

Explanation:

- Inside the function, calculate the volume of the cylinder using the formula and return the result.

- Then, take inputs from the user for radius and height as float numbers

- Call the function and print the result

4 0
3 years ago
Read 2 more answers
Which file types have .exe and .omg as their extensions?
Tatiana [17]
I know that Windows computer files use the extension exe.

3 0
3 years ago
7. What button would you click if you want to limit the mail merge to selected recipients?
ZanzabumX [31]
You would click "select recipient" so therefor the answer is B.
8 0
3 years ago
Complete the second line of code so that the first occurence of 3 is deleted from the list. myList = [7, 2, 3, 10, 3, 6]
a_sh-v [17]

Answer:

remove

Explanation:

myList. remove(3) will remove the first occurrence of 3 in the list.

7 0
2 years ago
Other questions:
  • How useful do you find the creation of folders in your computer?
    8·2 answers
  • Chevening is looking for individuals with strong professional relationship building skills, who will engage with the Chevening c
    15·1 answer
  • Which of the following techniques would a Baroque composer most likely employ to evoke an affect of agitation? Select one:
    14·1 answer
  • How do you record yourself on a macbook pro
    9·1 answer
  • 1) Using the density equation d=m/V: What is the density of a piece of metal with a mass o
    10·1 answer
  • Definition of powerpoint animation
    14·1 answer
  • which statement is true? O A Future games will be more context oriented. OB. Future games will be more product driven. Future ga
    13·2 answers
  • Suppose that the first goal in a GP problem is to make 3 X1 + 4 X2 approximately equal to 36. Using the deviational variables d1
    15·1 answer
  • En la historia del Computador porque se caracteriza la primera generación? *
    14·1 answer
  • Pa answer po thank you​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!