Skip to content

CS441 - Big Data Concepts

3 Topics 10 Posts
  • CS441 Assignment 2 Solution and Discussion

    Solved cs441 assignment 2 solution discussion fall 2019
    2
    0 Votes
    2 Posts
    820 Views
    zareenZ
    Solution: class Product: Name = "NULL" Brand= "NULL" Price= 0 Quantity= 0 def __init__(self, na, br, pr, qty): print print "--------------------------------" print "Pametarized Constructor called:" print "--------------------------------" self.Name = na self.Brand = br self.Price = pr self.Quantity=qty def setName(self, n): self.Name = n def setBrand(self, b): self.Brand=b def setPrice(self, p): self.Price=p def setQuantity(self, q): self.Quantity=q def getName(self): return self.Name def getBrand(self): return self.Brand def getPrice(self): return self.Price def getQuantity(self): return self.Quantity P1= Product("Computer","DELL",48000,5) print print "Object values initialized through Constructor:" print print "Name: " , P1.getName() print "Brand: ", P1.getBrand() print "Price: ", P1.getPrice() print "Quantity: ", P1.getQuantity() P1.setName("Cloths") P1.setBrand("Bonanza") P1.setPrice(4500) P1.setQuantity(10) print print "-------------------------------------------------" print print "Object values assigend thorugh setter functions:" print print "Name: " , P1.getName() print "Brand: ", P1.getBrand() print "Price: ", P1.getPrice() print "Quantity: ", P1.getQuantity()
  • 0 Votes
    2 Posts
    558 Views
    zareenZ
    https://youtu.be/VSHrNQftyHQ
  • CS441 Assignment 1 Solution and Discussion

    Solved cs441 assignment 1 solution discussion fall 2019
    2
    0 Votes
    2 Posts
    879 Views
    zareenZ
    Solution 100% start=0 evensum=0 oddsum=0 counteven=0 countodd=0 print("Enter the upper Limit:") upperLimit=input() print print("Even numbers are:") for num in range(start, upperLimit+1): if num%2==0: evensum=evensum+num counteven=counteven+1 print(num) print print("Sum of Even numbers:") print(evensum) print print("Total number of Even numbers within the range are:") print(counteven) print print("Odd numbers are:") for num1 in range(start, upperLimit+1): if num1%2!=0: oddsum=oddsum+num1; countodd=countodd+1 print(num1) print print("Sum of Odd numbers:") print(oddsum) print print("Total number of Odd numbers within the range are:") print(countodd)
How to Build a $1,000/Month PAK VS BAN Live Live Cricket Streaming
File Sharing

0

Online

3.0k

Users

2.8k

Topics

8.2k

Posts
| |