List: Basic Assignments


Write a python program, list_basic_assigments_YI.py
1. Create a_list and assign 20 random integer numbers between 50 and 75.
2. Create a new_list with 20 random integer numbers between 61 and 91.
3. Create another list, newer_list whose items are the sum of each item on the lists a_list and new_list
4. Create a histogram from a list of values.

# Creating a histogram from a list of values.

int_values = []   # a list of values

# input 8 integers from user
print ("Enter 8 integers between the values of 1 and 10:")

for i in range( len(int_values) ):
   new_value = int( input( "Enter integer %d: " % ( i + 1 ) ) )
   int_values += [ new_value ]

# create histogram
print ("\nCreating a histogram from int_values:")
print ("%s %10s %10s" % ( "Element", "Value", "Histogram" ))

for i in range( len( int_values ) ):
   print ("%7d %10d  %s" % ( i, int_values[ i ], "*" * int_values[ i ] ))


5. Create and display a histogram from a list of 10 random integer values between 5 and 9.
6. Use a list to solve the following problem: “Read in” 6 numbers. As each number is read, print it only if it is not a duplicate of a number already read.

Required Submission
1. Copy and paste the programs in the Text Entry tab.
2. Submit the list_basic_assigments_YI.py or the repl.it link.
NOTE: Documentation
Header:
a) Assignment description ( you can copy and paste the assignment itself)
b) Author’s name
c) Language and version
d) Date of completion
Input/Output:
Input(If any) and output for each part.