Writing of a program to take two integer and print sum and product of them.
Take two integer input from user and first calculate the sum of the two and then product of the two.
Take two double input for length and breadth of a rectangle and print area type casted to integer.
Take side of a square from user and print area and perimeter of it.

Answers

Answer 1

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


Related Questions

You are the IT administrator for a small corporate network. The employee in Office 1 needs your assistance managing files and folders. Your task is to use the command prompt to complete the following:

a. Create the D:​\​utilities​\​recover directory. Use the md or mkdir command to create (make) a directory.
b. Delete the D:​\​software​\​arch98 directory and all of its files.
c. Use the rd command to delete (remove) a directory.
d. Use the /s switch to remove the directory and all of its contents at once.

Answers

Answer:

(a) mkdir /d D:\utilities\recover    

     or

    mkdir D:\utilities\recover    

(b) rd  /s  D:​\software​\arch98

Explanation:

(a) To make a new directory we use the md or mkdir command followed by the name of the directory as follows;

mkdir [name_of_directory]

The name of the directory could also be a relative or absolute path depending on the request.

In the task, the specified directory uses an absolute path given as D:​\​utilities​\​recover. This path is in a drive D. Therefore, if you are in another drive different than D, to run this command, it is a great idea to do that with the /d switch.

In summary:

i. if in drive D, to make a directory D:\utilities\recover, type the following command;

mkdir  D:\utilities\recover    

ii. if otherwise in a different drive, type the following command.

mkdir /d D:\utilities\recover

(b) To delete a directory, we use the rd or rmdir command. If the directory has contents that also need to be deleted, we use the switch /s alongside the rd or rmdir.

In the task given, the directory to be deleted is D:\software\arch98. This includes deleting all of its files too. To do this, type the following command;

rd /s D:\software\arch98

What is the meaning of negative impact in technology

Answers

Answer:

the use of criminal thought by the name of education

Write an application that inputs a five digit integer (The number must be entered only as ONE input) and separates the number into its individual digits using MOD, and prints the digits separated from one another. Your code will do INPUT VALIDATION and warn the user to enter the correct number of digits and let the user run your code as many times as they want (LOOP). Submit two different versions: Using the Scanner class (file name: ScanP2)

Answers

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 int n, num;

 Scanner input = new Scanner(System.in);

 System.out.print("Number of inputs: ");

 n = input.nextInt();

 LinkedList<Integer> myList = new LinkedList<Integer>();

 for(int i = 0; i<n;i++){

     System.out.print("Input Integer: ");

     num = input.nextInt();

     while (num > 0) {

     myList.push( num % 10 );

     num/=10;

     }

     while (!myList.isEmpty()) {

         System.out.print(myList.pop()+" ");

     }

     System.out.println();

     myList.clear();

 }

}

}

Explanation:

This declares the number of inputs (n) and each input (num) as integer

 int n, num;

 Scanner input = new Scanner(System.in);

Prompt for number of inputs

 System.out.print("Number of inputs: ");   n = input.nextInt();

The program uses linkedlist to store individual digits. This declares the linkedlist

 LinkedList<Integer> myList = new LinkedList<Integer>();

This iterates through n

 for(int i = 0; i<n;i++){

Prompt for input

     System.out.print("Input Integer: ");

This gets input for each iteration

     num = input.nextInt();

This while loop is repeated until the digits are completely split

     while (num > 0) {

This adds each digit to the linked list

     myList.push( num % 10 );

This gets the other digits

     num/=10;

     }

The inner while loop ends here

This iterates through the linked list

     while (!myList.isEmpty()) {

This pops out every element of thelist

         System.out.print(myList.pop()+" ");

     }

Print a new line

     System.out.println();

This clears the stack

     myList.clear();

 }

1.               The smallest unit in a digital system is a​

Answers

Answer:

a bit

Explanation:

<3

Used for monitoring web activity by users to make sure that sensitive information won't leave the building.

A, Web server
B, FTP server
C, POP server
D, Proxy server ​

Answers

Answer: PROXY

Explanation:

The basic objective of the web server is to store, process and deliver web pages to the users.

FTP server is to allow users to upload and download files. An FTP server is a computer that has a file transfer protocol (FTP) address and is dedicated to receiving an FTP connection. FTP is a protocol used to transfer files via the internet between a server (sender) and a client (receiver)

pop provides access via an Internet Protocol (IP) network for a user client application to a mailbox (maildrop) maintained on a mail server

proxy server is a system that isolates internal clients from the servers by downloading and storing files on behalf of the clients. it intercepts requests for web-based or other resources that come from

some machine/items/gadget having only hardware​

Answers

Yeh it’s becoz they work with hardware that’s why

Write an algorithm that accepts two numbers,
divide the first number by the second and display the
quotient

Answers

Let’s write the algorithm in the form of a pseudocode!

Pseudocode:Quotient_of_Two_Number
Declare: num1, num2, quotient
START
Display (Enter a number)
Read num1
Display (Enter a number)
Read num2
quotient = num1/num2
Print (“Quotient”)
STOP

Frames control what displays on the Stage, while keyframes help to set up

Answers

Answer: A keyframe is a location on a timeline which marks the beginning or end of a transition. So for example, you have a movie and it transitions to another scene, keyframes tell it when and where to start the transition then when and where to stop the transition.

how to make an app according to peoples will

Answers

Answer:

Follow these steps to create your own app:

1)Choose your app name.

2)Select a color scheme.

3)Customize your app design.

4)Choose the right test device.

5)Install the app on your device.

6)Add the features you want (Key Section)

7)Test, test, and test before the launch.

8)Publish your app.

Explanation:

(!!_!!)

Which of the following statements regarding the SAP Hana product implemented by Under Armour is NOT true?
A. All of the statements are true.
B. The program allows legacy silos to remain intact.
C. The program can run across platforms and devices.
D. The program provides real-time results.

Answers

Answer:A

Explanation:i need points

A capacitor of capacitance 102/π µF is connected across a 220 V, 50 Hz A.C. mains. Calculate the capacitive reactance, RMS value of current and write down the equations of voltage and current.

Answers

Answer:

The capacitive reactance will be "100Ω" and RMS value of current is "2.2 A". A further explanation is provided below.

Explanation:

Given:

[tex]C =\frac{10^2}{\pi}\times 10^{-6} \ F[/tex]

[tex]V_{RMS}=220 \ V[/tex]

[tex]f = 50 \ Hz[/tex]

Now,

The capacitive reactance will be:

⇒ [tex]X_c=\frac{1}{\omega C} =\frac{1}{2 \pi f C}[/tex]

                   [tex]=\frac{1}{2\times \pi\times 50\times \frac{10^{-4}}{\pi} }[/tex]

                   [tex]=100 \ \Omega[/tex]

RMS value of current will be:

⇒ [tex]I_{RMS}=\frac{V_{RMS}}{X_c}[/tex]

             [tex]=\frac{220}{100}[/tex]

             [tex]=2.2 \ A[/tex]

So that,

⇒ [tex]V_m=220\times \sqrt{2}[/tex]

         [tex]=311 \ V[/tex]

⇒ [tex]I_m=2.2\times \sqrt{2}[/tex]

         [tex]=3.1 \ A[/tex]

hence,

The equation will be:

⇒ [tex]\nu=311 sin31 \ 4t[/tex]

and,

⇒ [tex]i=3.1 sin(314t+\frac{\pi}{2} )[/tex]

What does the abbreviation BBC stands for?

Answers

Answer:

British Broadcasting Corporation Microcomputer System

Explanation:

The British Broadcasting Corporation Microcomputer System, or BBC Micro, is a series of microcomputers and associated peripherals designed and built by the Acorn Computer company in the 1980s for the BBC Computer Literacy Project.

Answer:

British Broadcasting Corporation

Explanation:

This is a UK company which provides television and radio news in over 40 languages. This is the computer related meaning, there are other meanings to the abbreviation but they seem irrelevant in this case.

Hope this information was of any help to you. (:

What is computer code?
A. Java Script
B. XML
C. HTML
D. Any programming language

Answers

Answer:

D

Explanation:

What is a geam in the ggplot2 system?
a) a plotting object like point, line, or other shape
b) a method for making conditioning plots
c) a method for mapping data to attributes like color and size
d) a statistical transformation

Answers

Answer:

a) a plotting object like point, line, or other shape

Explanation:

A geom in the ggplot2 system is "a plotting object like point, line, or other shape."

A Geom is used in formulating different layouts, shapes, or forms of a ggplot2 such as bar charts, scatterplots, and line diagrams.

For example some different types of Geom can be represented as geom_bar(), geom_point(), geom_line() etc.

_ is a term used for license like those issues by creative commons license as an alternative to copyright

Answers

, . , .

Explanation:

'

Other Questions
Hal wonders about the properties of electromagnetic waves that make up the visible light spectrum. He conducts an experiment to see how sunlight behaves while moving through a prism. He is able to separate visible light into colors of the rainbow. He notices that each color has a unique wavelength and frequency.Hal wonders which colors have the highest and lowest frequencies. Rearrange the colors into the correct order on the lines in the second column. Place the color with the highest frequency wave at the top, and the color with the lowest frequency wave at the bottom.red ________________yellow ________________blue ________________orange ________________violet ________________green ________________ Complete the remainder of the table for the given function rule:Y=3x-5[X] -6 -3 0 3 6[Y] -23 ? ? ? ? Find the amount of money in an account after 9 years if $2,600 is deposited at 8% annual interest compounded monthly Se tienen 25 billetes de 5 y de 20 lempiras con un monto de 350 lempiras cuantos billetes de 5 lempiras se tienen y de 20 lempiras If the value of a in the quadratic function f(x) = ax^2 + bx + c is -2, the function will_______.a open down and have a minimumb open down and have a maximumc open up and have a maximumd open up and have a minimum boutta fail a Credit Recovery test cuz im distracted- Suppose you forecast that the standard deviation of the market return will be 20% in the coming year. If the measure of risk aversion in is A = 4: a. What would be a reasonable guess for the expected market risk premium? b. What value of A is consistent with a risk premium of 9%? (Round your answer to 2 decimal places.) c. What will happen to the risk premium if investors become more risk tolerant? Draw a model to represent each expression. 22)When iron rusts in air, iron(III) oxide is produced. How many moles of oxygen will reactwith 2.4 mol of iron ?4Fe(s) + 3O2(g) 2Fe2O3(s)A)1.2 molB)1.8 molC)2.4 molD)3.2 molE)4.8 molshow work How many possible outcomes are in spinning a spinner divided into red, yellow, orange, purple, blue, and pink?SOMEONE ANSWER PLS The chemical substances in our environment to which we respond can be called?A. stimuliB.impulsesC.responsesD.sense cells Legacy issues $630,000 of 9.0%, four-year bonds dated January 1, 2019, that pay interest semiannually on June 30 and December 31. They are issued at $571,310 when the market rate is 12%.Required:a. Prepare the January 1, 2018, journal entry to record the bonds' issuance.b. Prepare the journal entries to record the first two interest payments. 9. Who were the janissaries?O A. Elite troops of the Ottoman EmpireOB. Religious leaders of the Shi'a sectO C. Bureaucrats of the Mughal EmpireD. Traders of the Safavid Dynasty Que ideas se presentan en cada caso Rita is spending more time at home to study and practice math. Her efforts are finally paying off. On her first assessment she scored 58 points, then she scores 63 and 68 on her next two assessments. If her scores continued to increase at the same rate, on which assessments will she be scoring above 85? Select all that apply. City and villages which is better Which dialogue is punctuatedcorrectly?A. My teacher exclaimed ", I am so proud of your hardwork on this essay"!B. I was stunned, but I replied, "Thank you. I did workvery hard."C. My teacher then told the class "I am very happywith how hard all of you worked on your essays"! wats the answer of 1 2/5 14/15 Find the surface area of the square pyramid 8mm 6mm Which table represents a linear function?