Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

General Requirements 1 . This assignment is to be completed individually. Group submissions will not be considered. 2 . Analyze the problem, design a documented

General Requirements
1. This assignment is to be completed individually. Group submissions will not be considered.
2. Analyze the problem, design a documented plan (i.e. flowchart or pseudo-code), code and test a solution
following the step-by-step approach presented in this course.
3. Submit your solution and plan to the appropriate assignment folder on DC Connect by the due date
provided.
4. Your instructor will assign a grade and post feedback on your submission to DC Connect.
Program Requirements
For this lab you will create a simple console application using Python that will graphically display all the square
numbers within a range provided by the user. For our purposes, a square number is any number that can be
computed by multiplying a whole number by itself. The first several square numbers are 1(1 squared),4(2
squared),9(3 squared) and 16(4 squared). This assignment will provide you with the opportunity to design
program logic with both individual and nested loops. It should also reinforce the time-saving value of planning
before you code.
Getting User Input:
In the input phase of the program, display a banner-like header and then prompt the user for the bottom limit
and the top limit to the numbers they want to investigate. The lower limit must be a whole number between the
range of 1 and 10000 inclusive, and the upper limit must be between the lower limit and 10000 inclusive. Should
the user enter something other than a valid, in-range number, then display an appropriate message that
describes the problem and give the user the opportunity to input the limit again.
You will need to use try ... except or another means verifying whether the user input is numeric and a whole
number. Also, make sure that no processing occurs until the application has valid input.
The example below shows multiple invalid inputs; match this as closely as possible:
Assignment 1: Square Numbers Iteration
Assignment for COSC 1100 Intro to Programming
Final Output:
Once you have valid input, you will produce a list of all square numbers between the users entered lower bound
and upper bound. Start by displaying Square numbers between, including the boundaries entered. In addition
to displaying the square number, you will also display the square root of the number that it is the square of.
The following output example shows what your program should produce if the user entered boundaries were 4
and 120; match this as closely as possible:
At the end, be sure to use input() or something similar to wait before closing the program.
Style Guide Notes
To be eligible for full marks on this or any assignment in this course your application must conform to the
requirements as outlined above as well as our prescribed style guide, in this case making sure to observe the
PEP8 naming conventions for Python as well as appropriate and complete program documentation.
Development Hints
You may be tempted to utilize parts of your existing work or demo code as a starting point for this project.
Expect differences! It is strongly recommended that you code this assignment following the from plan to
program process from the beginning.
Remember that the aim of this lab is to have you practice using loops. There is more than one opportunity to do
so in this problem. An efficient, working solution will probably involve at least three different loops. If you find
yourself writing 10+ consecutive if/elif blocks you are taking the wrong approach
(PLEASE DONT USE AN INFINTE LOOP)
My previous code was missing :
Planning and Preparation
- Missing Desk Check
- Missing Flow Chart or Pseudo-Code
Naming Conventions, Declarations, and Documentations
- Documentation incomplete
- Missing Comment Header
Please explain the code too
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

Students also viewed these Databases questions

Question

' Which areas are you most dependent on to get your work done?

Answered: 1 week ago

Question

=+ Be prepared to discuss your answer with the class.

Answered: 1 week ago