An example python script to add numbers
Not what you're looking for?
Write a program in python that continually reads in numbers from the user and adds them together until the sum reaches 100. Write another program that reads 100 numbers from the user and prints out the sum.
Purchase this Solution
Solution Summary
This solution shows how to write a python script to read numbers from the user and add them together. This demonstrates some of the basic python features.
Solution Preview
Both of these programs will require using a while loop and a couple of variables. In the first problem we will continue to read numbers and sum them up until the sum is greater than 100. In other words, the "while" condition is "sum < 100" and the action we take in ...
Purchase this Solution
Free BrainMass Quizzes
Basic Networking Questions
This quiz consists of some basic networking questions.
Basic UNIX commands
Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
C# variables and classes
This quiz contains questions about C# classes and variables.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.