[SOLVED] 程序代写代做代考 python Problem 1

30 $

File Name: 程序代写代做代考_python_Problem_1.zip
File Size: 386.22 KB

SKU: 1510844592 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


Problem 1

1) Create a file Blowing in the wind.txt, whose contents are:

How many roads must a man walk down
Before they call him a man
How many seas must a white dove sail
Before she sleeps in the sand
How many times must the cannon balls fly
Before they’re forever banned
The answer my friend is blowing in the wind
The answer is blowing in the wind

2) Insert the song name “Blowin’ in the wind” into the file head.

3) Insert the name of singer “Bob Dylan” after the song name.

4) Add the string “1962 by Warner Bros. Inc.” to the end of file.

5) Print the file contents on the screen.

f=open(r’E:201702PythonBlowing in the wind.txt’,’r+’)

Problem 2

Given n, generate the first ‘n’ row of Pascal’s triangle.

For example, given n = 5, Return

[

[1],

[1,1],

[1,2,1],

[1,3,3,1],

[1,4,6,4,1]

]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 程序代写代做代考 python Problem 1
30 $