Python Please help me with code for line 4, 11, 13 an on. Please I am stuck on the problem

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Python Please help me with code for line 4, 11, 13 an on. Please I am stuck on the problem

Post by answerhappygod »

Python
Python Please Help Me With Code For Line 4 11 13 An On Please I Am Stuck On The Problem 1
Python Please Help Me With Code For Line 4 11 13 An On Please I Am Stuck On The Problem 1 (92.79 KiB) Viewed 41 times
Python Please Help Me With Code For Line 4 11 13 An On Please I Am Stuck On The Problem 2
Python Please Help Me With Code For Line 4 11 13 An On Please I Am Stuck On The Problem 2 (47.96 KiB) Viewed 41 times
Python Please Help Me With Code For Line 4 11 13 An On Please I Am Stuck On The Problem 3
Python Please Help Me With Code For Line 4 11 13 An On Please I Am Stuck On The Problem 3 (82.44 KiB) Viewed 41 times
Please help me with code for line 4, 11, 13 an on. Please I am
stuck on the problem
Problem Statement: In bowling, the player starts with 10 pins in a row at the far end of a lane. The goal is to knock all the pins down. For this assignment, the number of pins and balls will vary. Given the number of pins N and then the number of balls K to be rolled, followed by K pairs of numbers (one for each ball rolled), determine which pins remain standing after all the balls have been rolled. The balls are numbered from 1 to N for this situation. The subsequent number pairs, one for each K represent the first and last (inclusive) positions of the pins that were knocked down with each roll. Print a sequence of N characters, where "I" represents a pin left standing and "" represents a pin knocked down.

Test # 1 12 Input 10 3 8 10 25 36 52 12 44 10 3 35 46 10 10 50 55 5 5 33 Output I........ |..I.I |||....|||. |||||

bowling.py 1 # Please replace . . . (three dots) with your code. Don't forget the indentation. def update_bowling_configuration (pins, first, last): 2 | 3 '' 'Changes the pins configuration according to the fallen pins from first to last'' 4 n, k = [int (str_numbers) for str_numbers in input().split()] 7 pins = ['I'] *n # All pins are standing at the start of the game 8 for rolls in range(k): 9 first, last = [int(s) for s in input().split()] # collection of strike data #call your function below 10 11 12 #print pins below 13
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply