0% found this document useful (0 votes)
68 views

Fall 2022_CS441_1

This document outlines the instructions and objectives for Assignment No. 01 for the CS441 course on Big Data Concepts, due on December 5, 2022. It includes tasks related to Python programming, such as working with lists and tuples, and checking if a number is even or odd. Students must submit their assignments in specified formats and will receive zero marks for late submissions or copied work.

Uploaded by

servicesgilbert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Fall 2022_CS441_1

This document outlines the instructions and objectives for Assignment No. 01 for the CS441 course on Big Data Concepts, due on December 5, 2022. It includes tasks related to Python programming, such as working with lists and tuples, and checking if a number is even or odd. Students must submit their assignments in specified formats and will receive zero marks for late submissions or copied work.

Uploaded by

servicesgilbert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Assignment No.

01 (Graded) Total Marks: 20


SEMESTER Fall 2022
Due Date: 5-12-2022
CS441- Big Data Concepts

Student ID : BC210423245

Instructions:

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:

o The assignment is submitted after due date.


o The submitted assignment does NOT open or file is corrupted.
o The assignment is copied (from other student or ditto copy from handouts or internet).
o You are supposed to submit Zip file of your assignment, coding part in .py format and theory
part in .doc / Docx format.

Objectives:

The objectives of this assignment are,


1. Giving the idea of the syntax and basic functions of Python.

For any query about the assignment, contact at cs441@vu.edu.pk

GOOD LUCK

Marks: 20
Question No. 01:

Consider the following lists which are showing marks of different students in the Subjects of “Mathematics” and
“English.

List 1: Marks in Mathematics= 25, 44, 66, 65, 85, 78, 91, 18, 24, 51
List 2: Marks in English= 25, 44, 66, 65, 85, 81, 91, 1, 24, 51

You are required to write a program in python in which marks of both of these classes should be stored in the
form of Tuples. After storing marks, write code to perform the following tasks.
1. Find length of both List 1 and List 2.
2. Find lowest marks in both lists.
3. Find sum of marks of List 1 and List 2.
4. Compare whether List 1 is equal to List 2 or not.
5. Print output of all the given tasks on your screen.

Program:

# Define the two lists of marks

list1 = [25, 44, 66, 65, 85, 78, 91, 18, 24, 51]

list2 = [25, 44, 66, 65, 85, 81, 91, 1, 24, 51]

# Convert the lists to tuples

tuple1 = tuple(list1)

tuple2 = tuple(list2)
# Find the length of both lists

length1 = len(list1)

length2 = len(list2)

# Print the lengths

print(length1)

print(length2)

# Find the lowest marks in both lists

lowest1 = min(list1)

lowest2 = min(list2)

#Print the lowest marks

print(lowest1)

print(lowest2)

# Find the sum of marks of both lists

sum1 = sum(list1)

sum2 = sum(list2)

# Print the sums


print(sum1)

print(sum2)

# Compare whether List 1 is equal to List 2 or not

if list1 == list2:

print("It is equal")

else:

print("It is not equal")

Question No. 02:

Write a program in Python which should get a number from the user and check whether the number is even or
odd.

Program:

# Getting a number from the user

number = int(input("Enter a number: "))


# Check if the number is even or odd

if number % 2 == 0:

print(number, "is even.")

else:

print(number, "is odd.")

Lectures Covered: This assignment covers Lecture # 1-4

Deadline: Your assignment must be uploaded/submitted at or before 5th December 2022.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy