<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS441 Assignment 1 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/715/cs441-assignment-1-solution-and-discussion">CS441 Assignment 1 Solution and Discussion</a></p>
<pre><code>Assignment No.  1
</code></pre>
<p dir="auto">Semester: Spring 2020<br />
CS441 – Big Data Concepts<br />
Total Marks: 20<br />
Due Date: 01/06/2020<br />
Lectures covered:<br />
Week 1 to week 3</p>
<p dir="auto">Instructions<br />
Please read the following instructions carefully before submitting assignment:<br />
It should be clear that your assignment will not get any credit if:</p>
<p dir="auto">o	Assignment is submitted after due date.<br />
o	Submitted assignment does not open or file is corrupt.<br />
o	Assignment is copied (From internet/students).</p>
<p dir="auto">Software allowed to develop Assignment</p>
<ul>
<li>Python editor</li>
</ul>
<p dir="auto">Objectives:<br />
To enable students to write, execute a program in Python. Moreover to familiarize students with  the concepts of:<br />
•	Variables and operators<br />
•	Conditional statements<br />
•	Loop structures</p>
<p dir="auto">Assignment Submission Instructions<br />
You have to submit <a href="http://only.py" target="_blank" rel="noopener noreferrer nofollow ugc">only.py</a> file on the Assignments interface of CS441 on VULMS. Assignment submitted in any other format will not be accepted and will be graded zero marks.</p>
<p dir="auto">Assignment</p>
<p dir="auto">Write a program in Pyton programming language, which allows the user to input an integer value for a variable named upperLimit. Based on the input value, the program should perform the following tasks:</p>
<p dir="auto">•	Check whether the value entered by the user falls within the range from 1 to 100. (1 and 100 included in the given range.)<br />
•	Calculate and display the sum of all numbers within the range (1 to upperLimit).<br />
•	Calculate and display the average of all numbers within the range (1 to upperLimit).<br />
•	Calculate and display the total number of numbers within the range (1 to upperLimit).</p>
<p dir="auto">Sample output for the wrong input:<br />
<img src="https://i.imgur.com/Uz89tPV.png" alt="0dc57223-3af8-49ca-a7ce-e95a5d2ec81f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Sample output for the wrong input:</p>
<p dir="auto"><img src="https://i.imgur.com/1Dw0vOn.png" alt="ad04a7df-09b6-41d8-8ad8-d1c79cba3c0d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Sample output for the correct input:</p>
<p dir="auto"><img src="https://i.imgur.com/ZYZEfvz.png" alt="cbc6325a-a282-467b-a7dc-01cb8fe23173-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Deadline:<br />
The deadline to submit your assignment solution is 01/06/2020. Your assignment must be submitted within the due date through VULMS. No assignment will be accepted through email after the due date.</p>
]]></description><link>https://community.secnto.com//topic/1953/cs441-assignment-1-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 20:00:29 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/1953.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Jun 2020 07:31:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS441 Assignment 1 Solution and Discussion on Fri, 19 Jun 2020 07:32:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zaasmi" aria-label="Profile: zaasmi">@<bdi>zaasmi</bdi></a> said in <a href="/post/5482">CS441 Assignment 1 Solution and Discussion</a>:</p>
<blockquote>
<p dir="auto">Re: <a href="/topic/715/cs441-assignment-1-solution-and-discussion">CS441 Assignment 1 Solution and Discussion</a></p>
<p dir="auto">Assignment No.  1<br />
Semester: Spring 2020<br />
CS441 – Big Data Concepts<br />
Total Marks: 20<br />
Due Date: 01/06/2020<br />
Lectures covered:<br />
Week 1 to week 3</p>
<p dir="auto">Instructions<br />
Please read the following instructions carefully before submitting assignment:<br />
It should be clear that your assignment will not get any credit if:</p>
<p dir="auto">o	Assignment is submitted after due date.<br />
o	Submitted assignment does not open or file is corrupt.<br />
o	Assignment is copied (From internet/students).</p>
<p dir="auto">Software allowed to develop Assignment</p>
<ul>
<li>Python editor</li>
</ul>
<p dir="auto">Objectives:<br />
To enable students to write, execute a program in Python. Moreover to familiarize students with  the concepts of:<br />
•	Variables and operators<br />
•	Conditional statements<br />
•	Loop structures</p>
<p dir="auto">Assignment Submission Instructions<br />
You have to submit <a href="http://only.py" target="_blank" rel="noopener noreferrer nofollow ugc">only.py</a> file on the Assignments interface of CS441 on VULMS. Assignment submitted in any other format will not be accepted and will be graded zero marks.</p>
<p dir="auto">Assignment</p>
<p dir="auto">Write a program in Pyton programming language, which allows the user to input an integer value for a variable named upperLimit. Based on the input value, the program should perform the following tasks:</p>
<p dir="auto">•	Check whether the value entered by the user falls within the range from 1 to 100. (1 and 100 included in the given range.)<br />
•	Calculate and display the sum of all numbers within the range (1 to upperLimit).<br />
•	Calculate and display the average of all numbers within the range (1 to upperLimit).<br />
•	Calculate and display the total number of numbers within the range (1 to upperLimit).</p>
<p dir="auto">Sample output for the wrong input:<br />
<img src="https://i.imgur.com/Uz89tPV.png" alt="0dc57223-3af8-49ca-a7ce-e95a5d2ec81f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Sample output for the wrong input:</p>
<p dir="auto"><img src="https://i.imgur.com/1Dw0vOn.png" alt="ad04a7df-09b6-41d8-8ad8-d1c79cba3c0d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Sample output for the correct input:</p>
<p dir="auto"><img src="https://i.imgur.com/ZYZEfvz.png" alt="cbc6325a-a282-467b-a7dc-01cb8fe23173-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Deadline:<br />
The deadline to submit your assignment solution is 01/06/2020. Your assignment must be submitted within the due date through VULMS. No assignment will be accepted through email after the due date.</p>
</blockquote>
<p dir="auto"><strong>Solution Code:</strong></p>
<pre><code>start=1
sum=0.0
average=0.0
count=0

print("Enter the upper Limit:")
upperLimit=input()

if upperLimit&lt;=1:
	print("Wrong input!! Upper Limit should not be less than 1")
elif upperLimit&gt;100:
	print("Wrong input!! Upper Limit should not be greter than 100")
else:
        print
        for num in range(start, upperLimit+1):
                sum=sum+num
                count=count+1
        
        print("Sum of all numbers within the range:")
        print(sum)
        print
        average= sum/count
        print("Average of all the numbers within the range:")
        print(average)
        print
        print("Total number of numbers within the range:")
        print(count)

</code></pre>
]]></description><link>https://community.secnto.com//post/5483</link><guid isPermaLink="true">https://community.secnto.com//post/5483</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Fri, 19 Jun 2020 07:32:51 GMT</pubDate></item></channel></rss>