[Solved] EE4371 Assignment1-Reinforcement of concepts / methods

$25

File Name: EE4371_Assignment1_Reinforcement_of_concepts___methods.zip
File Size: 508.68 KB

SKU: [Solved] EE4371 Assignment1-Reinforcement of concepts / methods Category: Tag:
5/5 - (1 vote)

. Q1 Reinforcement of concepts / methods

  • Write a Python function that takes a positive integer n, and returns the sum of the squares of all the positive integers smaller than n.
  • Write a Python function that takes a positive integer n, and returns the sum of the squares of all the odd positive integers smaller than n.

Q2

What parameter values should be sent to the range constructor to produce a range with values:

  • 60,70,80
  • 4,2,0,-2,-4
  1. Creativity

Q3

Write a Python function that takes a sequence of integer values and determines if there is a distinct pair of numbers in the sequence whose product is odd .

Q4

Write a Python function that counts the number of vowels in a given character string.

Q5

Write a Python program that takes as input three integers, a, b and c, from the console and determines if they can be used in the following arithmetic formulas: (i) a+b=c, (ii) a=b-c, (iii) a*b=c.

  1. Project-based / Cross-Contextual Q6

https://en.wikipedia.org/wiki/Birthday_problem

Design a program that can test the Birthday problem, by a series of experiments, on randomly generated birthdays which test this paradox for n = 5,10,15,20,25,30200.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] EE4371 Assignment1-Reinforcement of concepts / methods[Solved] EE4371 Assignment1-Reinforcement of concepts / methods
$25