首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
辅导python程序、讲解program编程、Python设计程序调试 调试Matlab程序|解析SPSS
项目预算:
开发周期:
发布时间:
要求地区:
Assignment 1
Variables, Branching, Functions, Basic I/O, Algorithms, Testing
Due: Friday, September 29, 2021, 11:59PM pm (submit to cuLearn)
Submit a single zip file called A1.zip.
The assignment has 40 marks.
Notes: It is essential that you use the built-in, default, archiving program to create this zip file. If
we cannot easily open your zip file and extract the python files from them we cannot grade your
assignment. Other file formats, such as rar, 7zip, etc, will not be accepted.
Windows: Highlight (select with ctrl-click) all of your files for submission. Right-click and select
“Send to” and then “Compressed (zipped) folder”. Change the name of the new folder “A1.zip”.
MacOS: Highlight (select with shift-click) all of your files for submission in Finder. Right-click on
one of the files and select “compress N items…” where N is the number of files you have
selected. Rename the “Archive.zip” file “A1.zip”.
Linux: use the zip program.
After submitting your A1.zip file to cuLearn, be sure that you download it and
then unzip it to be certain that what you have submitted is what you wanted to
submit. This also checks that your zip file is not corrupted and can be unzipped.
Please note that reasons similar in nature to “I submitted the wrong files” or “I didn’t know the
zip file was corrupt” will not be accepted as an excuse after the due date.
Submit early and often. cuLearn will save your latest submission. I would highly suggest that
you submit as soon as you have one question done and keep re-submitting each time you add
another problem (or partial problem).
2
Late Policy
You have TWO 24-hour and ONE 12-hour late passes to use for assignments during the
semester, You can use one pass on an assignment or two (but you cannot use all three on a
single assignment).
You do not have to ask to use your passes. They will be used automatically. If you submit the
first assignment 3 hours late, your 12-hour pass will be used. You cannot later decide to use it
for another assignment.
Please note that cuLearn only keeps your LAST submission. If you submit on-time and then
submit the exact same files after the due date, it will be treated as being submitted after the due
date and either a late pass will automatically be used or the assignment will ultimately receive a
grade of zero (if all late passes are already used). Your assignment will still be graded and a
mark will appear in cuLearn. At the end of the semester when I am computing final grades, I will
adjust any late assignments that were submitted after all passes were used.
3
Q1: Turtles and Cows [20 marks]
Draw a cow,
Design your cow on paper. Using several basic shapes, like rectangles, squares, circles and
lines, design what your cow will look like (see the required elements needed below). Include
some coordinates (x and y locations) of where the shapes will be located. These do not have to
be exact but a good estimate. When mapping out your drawing, keep in mind that the shapes
will have colours and if two shapes overlap, the last one drawn will be on top of the other.
(Imagine cutting out small shapes of coloured paper and then placing them down to make your
cow.) You will take a picture (or scan) your design and submit this in a file called cow.pdf. If you
take a picture, simply embed it into an MS Word document and then export as PDF.
Now that you have your design, use the turtle graphics in Python to draw it. Add your turtle
commands to the provided cow.py file. Do not delete the lines of code already in the file. Just
add your code in the middle.
Requirements: Your picture must
● Look, more or less, like a cow (less is OK… abstract is OK...)
● Have at least FIVE coloured shapes (use begin_fill() and end_fill() for this)
● Use at least THREE different colours
● Be your own work
● Be a reasonable size (the TAs must be able to clearly see the different components, and
it should not be bigger than a typical sized laptop screen)
You can do this with a very small set of turtle commands such as
● forward(), left(), right()
● penup(), pendown(), pencolor(), pensize()
● begin_fill(), end_fill(), fillcolor()
Other commands that might make your life easier will be
● setheading(), goto(), setx(), sety()
● heading(), position()
You are NOT required to use anything more advanced than this. You are free to do so but it is
not required.
Note: You are NOT being graded on your artistic ability (or lack thereof). The question is really
asking you break down the problem into a sequence of individual steps to accomplish the goal.
4
Q2: Personal Unit Converter [20 marks]
You will create an interactive program which will act as your own personal unit converter. Your
program will do the following things:
1. When the program starts it should ask for the user’s name and then present a welcome
message (using the user’s name!)
2. It will then present the user with a list of possible conversions it can perform and ask for
the user to choose an option.
3. The user then makes a selection and the program will ask for a number to convert.
4. The program will then make the conversion and print it out.
5. The program will then present a closing message (again using the user’s name)
Your program will need to be able to perform at least 5 different conversions. In your code you
will write a function for each of your converters. Based on the user’s input you will call the
appropriate function. You are free to choose whatever conversions you would like but you must
include a “percent to letter grade” converter in your program. Use the following (simplified)
ranges for this conversion:
Grade Range Letter Grade
[80, 100] A
[70, 80) B
[60, 70) C
[50, 60) D
[0, 50) F
A note on this range notation: Depending on the type of bracket used when describing a range, the range will either
be inclusive or exclusive at that end. An inclusive end is represented using a square bracket and means that this
number is included in the range. An exclusive end is represented using a round bracket and means that everything
up to but not including this number is included in the range. For example, the A range is from 80% - 100%,
including both 80% and 100%. On the other hand, the C range is from 60% up to but not including 70% (ie. any
number in the sixties).
5
Here is a few examples of what running your program could look like (user input is highlighted to
help illustrate the example):
Please enter your name: cat
Hello Cat, welcome to your personal unit converter.
Please choose which conversion you would like to perform:
1 - convert cm to inches
2 - convert percent to letter grade
3 - convert cups to ml
4 - convert grams to ounces
5 - convert fahrenheit to celsius
Choice: 1
Value in cm to convert: 10
10 cm = 3.937007874015748 inches
Goodbye Cat.
---------------------------------------------------------
Please enter your name: dog
Hello Dog, welcome to your personal unit converter.
Please choose which conversion you would like to perform:
1 - convert cm to inches
2 - convert percent to letter grade
3 - convert cups to ml
4 - convert grams to ounces
5 - convert fahrenheit to celsius
Choice : 2
Percent to convert to letter grade: 67.1
67.1% = C
Goodbye Dog.
Submit your code in a file called convert.py.
Recap [A1.zip]
Submit a single zip file called A1.zip. Your zip file should the following THREE files:
● cow.py (this is your grade calculator program)
● cow.pdf (this is your plan for drawing your cow)
● convert.py (this is your unit conversion program)
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!