Write a program that takes an indefinite amount of numbers

Assignment Help Python Programming
Reference no: EM131663741

Lab Assignment: Find the second largest number

Write a program that takes an indefinite amount of numbers as input and outputs the next largest number to the screen after the user is finished entering numbers and would like to exit.

An example of user interaction with the program is shown below:

Please enter a positive number (type -1 to exit): 99
Please enter a positive number (type -1 to exit): 42
Please enter a positive number (type -1 to exit): 73
Please enter a positive number (type -1 to exit): 24
Please enter a positive number (type -1 to exit): 444
Please enter a positive number (type -1 to exit): 324
Please enter a positive number (type -1 to exit): 20
Please enter a positive number (type -1 to exit): -1
The second largest number entered is: 324

The zipped le to turn in must include:

lab.txt: a brief text le describing the design of your program, i.e. the steps required for the calculation.

lab interactive.py: the source code using standard input/output.

lab interactive.scr: the typescript le to show that your program works with the example input provided above.

Reference no: EM131663741

Questions Cloud

Research using the course learning materials : Research using the course learning materials, valid internet sources, and related personal experience, the advantages and disadvantages of utilizing CIDR.
Discuss techniques used by malware developers disguise code : Please discuss the techniques used by malware developers to disguise their code and prevent it from being analysed
What is the total contribution margin : If the sales mix is maintained, what is the total contribution margin when 200,000 units are sold? What is the operating income?
Review the four strategic goals in the strategic plan : Review the four Strategic Goals in the Strategic Plan .Determine how technology solutions can be used to support organizational process.
Write a program that takes an indefinite amount of numbers : Write a program that takes an indefinite amount of numbers as input and outputs the next largest number to screen after the user is finished entering numbers.
Structure to check for correct placement of parentheses : Implement a program that will use a stack structure to check for correct placement of parentheses in an algebraic expression.
Provide rationales and evidence to support decisions : The practice has been operating for over 15 years, and many of the administrative and clinical staff were hired when the practice opened
Supporting two directory display commands indos : What is the purpose of supporting two directory display commands inDOS? Which command is more useful, TREE or DIR?
Should crystal clear buy the new production equipment : Assuming the same sales mix, at what total sales level would Crystal Clear be indifferent between using the old equipment and buying the new production.

Reviews

Write a Review

Python Programming Questions & Answers

  Code a console-based program in python

CP1404/CP5632 2016 SP2/22/52 Shopping List 1.0 - You are to plan and then code a console-based program in Python 3, as described in the following information and sample output. This assignment will help you build skills using selection, repetition,..

  Overall architecture diagram of the external facing system

Design a Service Oriented Architecture-based solution for a given domain. You must show a good understanding of Service Oriented principles. In addition you must show knowledge and understanding of specific SOA techniques, practices and approaches..

  Interaction between the customer and the machine

In Python:Simulate a cash register or ATM including the interaction between the customer and the machine (i.e. assume that you are automating the responses)

  The integers should be printed in order with addresses

The integers should be printed in order with addresses from main. When the steps of the function order have been completed the smallest value will be stored in a, the middle in b, and the largest in c.

  What is complexity in asymptotic notation of your solution

Write a program in Python to draw the following figure: What is the complexity in asymptotic notation of your solution? Return the "centered" average of an array of ints, which we'll say is the mean average of the values.

  You will define an operation on positive integers called

you will define an operation on positive integers called twiddle which consists of summing the squares of the digits of

  Write a program that does simple packet routing

Write a program that does simple packet routing and your program will take three command-line arguments:

  Write a python program that will accept the base and height

Write a Python program that will accept the base and height of a triangle and compute the area. Write a Python program to compute the greatest common divisor (GCD) of two positive integers.

  Function should return a dictionary

Write a function numOccur(s), where s is a string; the function should return a dictionary whose keys are the 26 ascii letters abcdefghijklmnopqrstuvwxyz

  Given the strings s1 and s2 that are of the same length

Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by the first character of s2, followed by the second character of s1, followed by the second character of s2, and so on (in ..

  Improve the code for the haunted house game

Improve the readability of the code by improving the function names, variables, and loops, as well as whitespace. Document these changes in your journal and define a win condition for the game, for example, collecting all items and returning to the..

  Write a program to receive a series of numbers

Write a program to receive a series of numbers (including decimal) from the user until enter key is pressed. Process the input data and display number count, sum and average. Use proper data type and format.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd