Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please make it simple with not extra comments or nothing. add the def main at the bottom too Task 3: Random number sorting Algorithm Use

please make it simple with not extra comments or nothing. add the def main at the bottom too image text in transcribed
Task 3: Random number sorting Algorithm Use the random python library to generate 100 pseudo random values from 20 to 120 and save it to a list. Use the following code to sort out this list from lowest to highest. Remember that there is a random.randint(x,y+1) function where you can use. Yet there is something important to use as well besides this radint(x,y+1). Hint! there is a requirement to do this with time and seed. import random # my bubble sorting Algorithm function def bsortist): n = len(Ist) temp. i = 0,0 while in: j= 1 while j Ist[i]: temp = Ist[i-1] Ist[i-1] = Ist[i] Istol = temp ja1 i+=1 return ist Task 4: Commissions Sales Force Inc. needs help calculating sales commissions. Its salesmen always report their sales figures in groups of 3 and each sale is always priced differently. Some salesmen are gaming the system and reporting the same sale twice. In order to prevent this, management wants you to write a function that takes 3 integer values abe) as parameters and returns their sum. However, if one of the values is the same as another of the values, it does not count towards the sum. Example: Enter in 3 values on one line>>> 234 Your sum ispo Enter in 3 values on one line 114 your sum is<:>

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

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions