Home / Expert Answers / Computer Science / using-set-write-a-python-program-named-lab10-1-py-to-generate-mark-6-random-numbers-using-set-pa525

(Solved): Using Set: Write a Python program (named Lab10_1.py) to generate mark 6 random numbers, using set: ...




Using Set: Write a Python program (named Lab10_1.py) to generate mark 6 random numbers, using set:

Start with empty set, add
Using Set: Write a Python program (named Lab10_1.py) to generate mark 6 random numbers, using set: Start with empty set, add elements within proper range of mark 6 numbers ( 1 to 49\( ) \), until the size of the set is 6. Use function calling random . randint \( (1,49) \) Show all random numbers picked (even duplicated) Show the final result (the set with 6 unique numbers) Sample Program Outnut (mav have dunlicated number during the looning): Using Dictionary: Write a Python program (named Lab10_2. py) to hold the information pairs of integer ( 1 to 10 ) to its cube value, with dictionary: Display the whole dictionary by simple print () function Sample Program Output: The dictionary of num: cube pair (integer numbers 1 to 10) is: \( \{1: 1,2: 8,3: 27,4: 64,5: 125,6: 216,7: 343,8: 512,9: 729 \), 10: 1000\( \} \)


We have an Answer from Expert

View Expert Answer

Expert Answer


Write a python program to generate 6 random numbers using Set import random # function definition sixRandom def
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe