[Solved] 2 Parts Project Python 27 Last Picture Far Help Star Project Pls Q37263393
howdo i do these 2 parts of the project in python 2.7? the lastpicture is what i have so far

![ba - Not epad File Edit Format View Help def getStarPixelX(star str): lis star_str.split(,) x-cor = float(lis[0]) x pi cor](https://media.cheggcdn.com/media%2F51e%2F51e00986-a8c0-444a-9caa-de73c674b414%2Fimage.png)
help me with the star project pls!Section O1 – Intro to Xfinity Stream drawStar0 1 Input Parameter: a star string No Return Steps: 1. Get the pixel x, y, and size values for the star using the functions you previously defined. 2. Calculate the leftX, topY, rightX, bottomY coordinates for the rectangle. (Hint: size/2) 3. Draw the rectangle using the code below: width-0) canvas , ereate-rectangle(leftX, rightX, botton, fill-“white, top, Below are some example function calls that draw stars. 8 Intro to Programming Section 01- YouTube Sports-Xfiety Stream drawAllStars0 No Input Parameters . No Return Steps: 1. Open the file’stars.txt (Make sure you download it to the Desktop first.) 2. Split file into lines 3. For cach line, call the drawStarO function. Below is the example function call. 。drawAllStarsO getStarStringO 3 ba – Not epad File Edit Format View Help def getStarPixelX(star str): lis star_str.split(“,”) x-cor = float(lis[0]) x pi cor 250+(250*x_ cor) return x pi_cor print getStarPixelx(“0.0,1.0,อ.0,1,15,1”) print getStarPixelx(“θ.5,-9·5,0.0,2,2.0,2”) def getStarPixelY (star_str): lis star_str.split(“,”) y cor float (lis[1]) y pi_cor 250-(250*y_cor) return y_pi_cor print getstarPixelY(“e.0,1.0,0.0,1,-1.5,1”) print getStarPixelY(“0.5,-0.5,0.0,2,2.8,2”) def getStarSize(star_str): lis-star str.split(“,”) mag-float (lis[4]) size_val-10.0/(mag+2) return size val print getStarSize(“.e,1.0,0.0,1,-1.5,1”) print getStarSize(“e5,-0.5,0.0,2,2.0,2”) def getStarName (star str): lis star_str.split(“,”) star_name- if len(lis)-7: star_name str(lis[-1]) return starinanm print getStarName (“0.0,1:e,0.e,4, -1.5,1,BOB”) print getStarName(“e.5,-0.5,0.0,2,2.0,2” Show transcribed image text Section O1 – Intro to Xfinity Stream drawStar0 1 Input Parameter: a star string No Return Steps: 1. Get the pixel x, y, and size values for the star using the functions you previously defined. 2. Calculate the leftX, topY, rightX, bottomY coordinates for the rectangle. (Hint: size/2) 3. Draw the rectangle using the code below: width-0) canvas , ereate-rectangle(leftX, rightX, botton, fill-“white, top, Below are some example function calls that draw stars. 8
Intro to Programming Section 01- YouTube Sports-Xfiety Stream drawAllStars0 No Input Parameters . No Return Steps: 1. Open the file’stars.txt (Make sure you download it to the Desktop first.) 2. Split file into lines 3. For cach line, call the drawStarO function. Below is the example function call. 。drawAllStarsO getStarStringO 3
ba – Not epad File Edit Format View Help def getStarPixelX(star str): lis star_str.split(“,”) x-cor = float(lis[0]) x pi cor 250+(250*x_ cor) return x pi_cor print getStarPixelx(“0.0,1.0,อ.0,1,15,1”) print getStarPixelx(“θ.5,-9·5,0.0,2,2.0,2”) def getStarPixelY (star_str): lis star_str.split(“,”) y cor float (lis[1]) y pi_cor 250-(250*y_cor) return y_pi_cor print getstarPixelY(“e.0,1.0,0.0,1,-1.5,1”) print getStarPixelY(“0.5,-0.5,0.0,2,2.8,2”) def getStarSize(star_str): lis-star str.split(“,”) mag-float (lis[4]) size_val-10.0/(mag+2) return size val print getStarSize(“.e,1.0,0.0,1,-1.5,1”) print getStarSize(“e5,-0.5,0.0,2,2.0,2”) def getStarName (star str): lis star_str.split(“,”) star_name- if len(lis)-7: star_name str(lis[-1]) return starinanm print getStarName (“0.0,1:e,0.e,4, -1.5,1,BOB”) print getStarName(“e.5,-0.5,0.0,2,2.0,2”
Expert Answer
Answer to how do i do these 2 parts of the project in python 2.7? the last picture is what i have so far help me with the star pro… . . .
OR

