Question: python program: i need the user to input a 7 bit binary string and the program randomly flips on bit. i seem to be struggling

python program: i need the user to input a 7 bit binary string and the program randomly flips on bit. i seem to be struggling to get this to work.

H = (input(' 7-bit binary string: ')) m= [H] # Using map to turn the inputed string into a list that can be easily manipulated hl= list(map(int, str(m[0]))) random.choice(hl) if choice== 1: choice= 0 else: choice= 1 print (hl)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!