Complete the python code to take two integers as the user input and print their average...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Complete the python code to take two integers as the user input and print their average 1 number1=int (input (2)) 2 number2=int (input (2)) 3 avg = (number1 + number2) / 2 4 print 'The average of numbers = %0.2f¹ % avg) Output 22The average of numbers = 2.00 Complete the python code to take two integers as the user input and print their average 1 number1=int (input (2)) 2 number2=int (input (2)) 3 avg = (number1 + number2) / 2 4 print 'The average of numbers = %0.2f¹ % avg) Output 22The average of numbers = 2.00
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Jet Corporation had 12.0 million shares of common stock outstanding during the current calendar year. On July 1, Jet issued eighteen thousand $1,000 face value, convertible bonds. Each bond is...
-
Choose the logo of any company or brand, and redesign it with your own artistic spin. Then give me a reason as to why you went the direction you chose (i.e. Was it a subliminal message like the...
-
Objective Create a calculator for positive, single-digit integers for basic math operations: add, subtract, multiply, divide How to use command line arguments. How to use an array of pointers to...
-
The word culture is used in many ways, such as when people talk about national culture, organisational culture, political culture or youth culture. In which ways do the meanings of culture differ?
-
Knowing that the pulley has a radius of 1.25 in., determine the components of the reactions at B and E. 3 in. 4.5 in. B. D. 3.75 in. 75 lb
-
Find the radius of convergence and interval of convergence of the series. 2"(x 2)" (n + 2)! n=1
-
Design an electronic survey, using an online website, to determine if there is a relation between health awareness and purchasing organic food. Use the survey to determine if a difference in gender...
-
Specifications for the computer upgrades in Problem 4 are 78 minutes and 81 minutes. Based on the data given in the problem, are the specifications being met? Estimate the percentage of process...
-
Great Boots Company sells rock climbing equipment. On February 28, Great Boots had the following accounts and balances: Bonds payable $180,000 Discount on bonds payable 19,000 On that day, Great...
-
The Fashion Rack has a monthly accounting period. The firms chart of accounts is shown below and on the next page. The journals used to record transactions are the sales journal, purchases journal,...
-
TA Vector A is shown in the figure. Given its magnitude A=96m and the angle 0=57. Find its x- component Ax y
-
Solve the rational equation. - - 6 = 232 = 3/3 4 5
-
How can leaders strategically employ delegation as a mechanism for distributing authority and responsibility, optimizing resource allocation, and empowering team members to achieve collective...
-
1 3 . Write a pseudocode for the following problem that calculates the current balance in a bank account. Ask the user for: a . The starting balance b . The amount of deposit c . The amount of...
-
Using your knowledge of the South African transport market, and the economy, reflect on the procurement problems that may occur during the implementation of successful transport PPP in South Africa.
-
Suppose a country only produces pineapples and coconuts. In 2020 (the base year), 800 pineapples were produced and sold at $2 each and 500 coconuts were produced and sold at $3 each. In 2021, 1,000...
-
Fishes coming under the class chondrichthyes have to swim continuously. Why?
-
You are standing on the top of a building and throw a ball vertically upward. After 2 seconds, the ball passes you on the way down, and 2 seconds after that, it hits the ground below. a. What is the...
-
Revise Programming Exercise 3.15 to add an additional $2,000 award if two digits from the user input are in the lottery number. Write a program that prompts the user to enter an integer for today?s...
-
Rewrite Listing 8.2, GradeExam.java, to display the students in increasing order of the number of correct answers. Listing 1 public class GradeExam { 2 /** Main method */ public static void...
-
Write a program that converts the Java source code from the next-line brace style to the end-of-line brace style. For example, the following Java source in (a) uses the next-line brace style. Your...
-
Which of the following questions can an interviewer legally ask a job candidate during a telephone interview? (a) Are you pregnant or planning to soon start a family? (b) What skills do you have that...
-
An employment test that yields different results over time when taken by the same person lacks ____________. (a) validity (b) reliability (c) realism (d) behavioral anchors
-
The responses most likely to be associated with use of a force-coercion change strategy are best described as __________. (a) internalized commitment (b) temporary compliance (c) passive cooptation...
Study smarter with the SolutionInn App