Python Program
Problem: Using the yield keyword, create a number generator that display "need" random numbers from a specific range of number that are specified. Use random library
Instruction: Complete the program below
Extracted text: main.py 1 import random 2 3 random.randint(1,10) 4 5- def rand_num(lo,hi,need): 6 pass 8 - for num in rand_num(5,10,5): print(num) 9 Output should be like: 6 10 8 8 7 ...Program finished with exit code 0 Press ENTER to exit console.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here