Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started