PRP201c_-_FA_2022_-_PE_133.webp
Aizawa2004

PRP201c_-_FA_2022_-_PE_133.webp

1. (3 points) You are required to develop a python program that will throw two dice until the top faces of the two dice total to a specified number.
The output from your program looks something like:
Enter an integer number of total: 8
Dice Thrower
Result of throw: 11+3
Result of throw: 26+5
Result of throw: 34+3
Result of throw: 46+2
You got your total in 4 throws
2. (3 points) Given an text file "Text.txt". Write a program to read through the file and print all number combinations in the list. For example, enter a file name "Text.txt" or leave it blank and match the output below.
Enter file: Text.txt
The original list from the file is: ['2', '1', '6', '8']
All numbers combinations: [21, 26, 28, 16, 18, 68]
+ 100%
Zoom
Close
Chưa có bình luận nào.

Thông tin

Category
PRP201c
Thêm bởi
Aizawa2004
Ngày thêm
Lượt xem
1,038
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom