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
ASAP PLZ!!!!!! Type the correct answer in the box. Spell all words correctly What are the steps of moving data into a data wareh
babunello [35]

Answer:

At its most basic, the ETL process encompasses data extraction, transformation, and loading. While the abbreviation implies a neat, three-step process – extract, transform, load – this simple definition doesn't capture: The transportation of data.

Explanation:

hope this work man

4 0
3 years ago
Brainliest to Best Answer!
Shtirlitz [24]
ArrayIndexOutOfBoundsException
because it includes the extra info that you tried (and failed) to access an array
8 0
3 years ago
What is the difference between a queue and a stack?
Zinaida [17]

Answer:

Difference between Queue and Stack are as following:-

  1. Queue is a FIFO(First In First Out) type data structure while Stack is a LIFO(Last In First Out) type data structure.
  2. The insertion and deletion of elements from the queue happens from two ends insertion at the tail and deletion from the front.While the insertion and deletion from stack happens from one end only that is top.
  3. The insertion and deletion operation in queue are referred as enqueue and dequeue. While in stack they are referred as push and pop respectively.
7 0
4 years ago
The
saveliy_v [14]
The answer is Undo I think
4 0
3 years ago
Read 2 more answers
Python Programming
Phoenix [80]

The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:

<h3>Python Code</h3>

# Python program to create Bankaccount class

# with both a deposit() and a withdraw() function

class Bank_Account:

def __init__(self):

 self.balance=0

 print("Hello!!! Welcome to the Deposit & Withdrawal Machine")

def deposit(self):

 amount=float(input("Enter amount to be Deposited: "))

 self.balance += amount

 print("\n Amount Deposited:",amount)

def withdraw(self):

 amount = float(input("Enter amount to be Withdrawn: "))

 if self.balance>=amount:

  self.balance-=amount

  print("\n You Withdrew:", amount)

 else:

  print("\n Insufficient balance ")

def display(self):

 print("\n Net Available Balance=",self.balance)

# Driver code

# creating an object of class

s = Bank_Account()

# Calling functions with that class object

deposit()

s.withdraw()

s.display()

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

8 0
2 years ago
Other questions:
  • Software that interprets commands from the keyboard and mouse is also known as the A.hard drive.B.operating system.C.desktop or
    7·2 answers
  • Which element in Access is an ideal data source?
    12·2 answers
  • Which of the following is the answer?
    5·1 answer
  • Types of computer that we use in our daily life​
    13·2 answers
  • Sally is editing her science report about living things. She needs to copy a paragraph from her original report.
    13·1 answer
  • Three Cat 5e cables were run from an office area to three computers in a machine shop. Work took place on the weekend when the m
    14·1 answer
  • Note oj cyber security​
    6·1 answer
  • Write code that prints: Ready! numVal ... 2 1 Go! Your code should contain a for loop. Print a newline after each number and aft
    14·1 answer
  • Write a program that gets a list of integers from a user. First, the user should be asked to enter the number of integers to be
    5·1 answer
  • Write a short program that asks the user to enter a month &amp; prints a message based on the month
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!