美女扒开腿免费视频_蜜桃传媒一区二区亚洲av_先锋影音av在线_少妇一级淫片免费放播放_日本泡妞xxxx免费视频软件_一色道久久88加勒比一_熟女少妇一区二区三区_老司机免费视频_潘金莲一级黄色片_精品国产精品国产精品_黑人巨大猛交丰满少妇

AIC2100代寫、Python設計程序代做

時間:2024-04-02  來源:  作者: 我要糾錯



Lab 1
Byungjoo Lee
Yonsei University
AIC2100 AI Programming with Python
Lab 1 AIC2100
2
You must follow the specification thorougly!
• Any typos (including whitespace and linebreak) will result in a point deduction.
• If you’re asked to write the comment or docstring, you must add them.
• If some Python libraries are prohibited, importing them will result in 0 points.
• Depending on the lab content, additional rules can be added.
• Please read the specification document carefully and submit your code.
• We won't accept appeals for point deductions based on misinterpreting the lab specification
documentation.
• If any specification is unclear, please post your question on the Q&A board.
Lab 1 AIC2100
3
Please refer to the guidelines noted in previous labs. They remain applicable for this and
subsequent labs.
Any updates in guidelines will be announced again.
Coding guideline
Lab 1 AIC2100
4
Notation
• To clearly instruct the lab specifications, (1) we use “˽” to depict a whitespace (blank)
character and (2) “¤” for a “n” (newline) character.
• Underlined text refers to the user input (will be demonstrated again in a further lab).
• New notations will be demonstrated additionally on there first mention.
Lab 1 AIC2100
5
One important note about automated archiving
• In lab0, the automated archive code used the incorrect folder name format “{student_id}”.
• It should have been “lab{X}_{student_id}”. (Sorry)
• Don’t worry, we did not deduct your point with this since it is our mistake.
• In the slides explaning the automated archive code (ap_lab0.pdf p.15-16), we specified the
wrong format, while in the slide explaning manual archiving (p. 17), we specified the correct
format.
• We revised the code and update it to LearnUs, even though it is outdated.
• TL;DR
• If you want to use automated archiving, just use our provided code. You don’t need to
revise it on your own.
• If you manually archived in Lab 0, “lab{X}_{student_id}” foldername is correct.
Lab 1 AIC2100
6
Problem 1
Write a program that allows the user to enter any integer base and integer exponent, and displays
the value of the base raised to that exponent. Your program should work as shown below.
Note 1. You do not have to consider faulty input. More specifically, we will test your program for
integer inputs only.
Note 2. The integer base and exponent will be non-negative.
This program needs to ask two times for input from the user. The input prompt with the second
input() command depends on the input from the first input() command. This is highlighted in the
following example:
What˽base?˽10¤
What˽power˽of˽10?˽4¤
10˽to˽the˽power˽of˽4˽is˽10000¤
Lab 1 AIC2100
7
Problem 1
Here are some examples.
What˽base?˽0¤
What˽power˽of˽0?˽5¤
0˽to˽the˽power˽of˽5˽is˽0¤
What˽base?˽2¤
What˽power˽of˽2?˽10¤
2˽to˽the˽power˽of˽10˽is˽1024¤
What˽base?˽5¤
What˽power˽of˽5?˽0¤
5˽to˽the˽power˽of˽0˽is˽1¤
What˽base?˽-25¤
What˽power˽of˽-25?˽3.7¤
You don’t need to consider non-integer inputs.
Lab 1 AIC2100
8
Problem 1
FAQ
Q. What is 0
0?
A. Mathematically, it converges to 1 and Python will output 1 too.
Lab 1 AIC2100
9
Problem 2
Write a program that allows the user to enter a base integer and a four-digit number, and displays
its value in base 10. Each digit should be entered one per line, starting with the leftmost digit, as
shown below. This program also needs to ask several times for input from the user. The output
depends on the input from input() command. This is highlighted in the following example:
Enter˽the˽base˽integer:˽2¤
Enter˽leftmost˽digit:˽1¤
Enter˽the˽next˽digit:˽0¤
Enter˽the˽next˽digit:˽0¤
Enter˽the˽last˽digit:˽1¤
Your˽input˽is˽1001˽in˽base˽2¤
The˽value˽is˽9˽in˽base˽10¤
Example 1
Enter˽the˽base˽integer:˽5¤
Enter˽leftmost˽digit:˽0¤
Enter˽the˽next˽digit:˽3¤
Enter˽the˽next˽digit:˽4¤
Enter˽the˽last˽digit:˽2¤
Your˽input˽is˽0342˽in˽base˽5¤
The˽value˽is˽97˽in˽base˽10¤
Example 2
Lab 1 AIC2100
10
Problem 2
Note 1. You can assume that the base integer is integer from 2 to 10 and four-digit numbers are
non-negative integers.
Note 2. You do not have to consider faulty inputs. There are two cases.
- Invalid base integer input (non-integer or out-of-range)
- Invalid four-digit number (non-integer or exceeding base integer)
Note 3. You don’t need to omit starting zeros when printing your input digit numbers (e.g., if your
input is 0011, then print 0011, not 11). See example 2 in the previous slide.
Lab 1 AIC2100
11
Problem 3
Write a program in which the user can enter any number of positive and negative integer values,
that displays the number of positive values entered and their summation, as well as the negative
values. Your program should work in following conditions.
1. Exclude all numbers that aboslute value is greater than 100 (i.e., 𝑥 > 100).
2. Your program should stop taking the user input and print the results when 0 is entered.
3. The format of printed output differs by whether the number of entered positive/negative integer
is 0 or not.
4. You don’t need to consider faulty inputs (non-integer or -0).
Hint. You can use sum() function.
See the examples on the next slides.
Lab 1 AIC2100
12
Problem 3
Your˽number:˽5¤
Your˽number:˽-32¤
Your˽number:˽105¤
Your˽number:˽31¤
Your˽number:˽-52¤
Your˽number:˽-25234¤
Your˽number:˽0¤
There˽are˽2˽positive˽integer(s)˽and˽the˽sum˽is˽36¤
There˽are˽2˽negative˽integer(s)˽and˽the˽sum˽is˽-84¤
Example 1 – Normal case
Lab 1 AIC2100
13
Problem 3
Your˽number:˽5¤
Your˽number:˽-1002¤
Your˽number:˽15¤
Your˽number:˽31¤
Your˽number:˽0¤
There˽are˽3˽positive˽integer(s)˽and˽the˽sum˽is˽51¤
No˽negative˽integer˽entered¤
Example 2 – Empty negative integer list
Lab 1 AIC2100
14
Problem 3
Your˽number:˽-22¤
Your˽number:˽12345¤
Your˽number:˽-99¤
Your˽number:˽-6¤
Your˽number:˽0¤
No˽positive˽integer˽entered¤
There˽are˽3˽negative˽integer(s)˽and˽the˽sum˽is˽-127¤
Example 3 – Empty positive integer list
Lab 1 AIC2100
15
Problem 3
Your˽number:˽0¤
No˽positive˽integer˽entered¤
No˽negative˽integer˽entered¤
Example 4 – Immediate termination
Lab 1 AIC2100
16
Problem 4
Write a program that calculates the least common multiple (LCM, 최소공배수) of two input positive
integer.
Note 1. You can assume that the input integers are always greater than 1.
Note 2. You do not have to consider faulty inputs.
Note 3. You are not allowed to use any library (including standard one)
Hint 1. Find the greatest common divisor (GCD, 최대공약수) first.
Hint 2. LCM can be computed as the multiple of two integers divided by their GCD.
To compute GCD, we strongly suggest you to use Euclidean algorithm (유클리드 호제법).
Lab 1 AIC2100
17
Problem 4
Input˽integer˽1:˽3¤
Input˽integer˽2:˽4¤
The˽least˽common˽multiple˽of˽3˽and˽4˽is˽12¤
Input˽integer˽1:˽16¤
Input˽integer˽2:˽36¤
The˽least˽common˽multiple˽of˽16˽and˽36˽is˽144¤
Input˽integer˽1:˽1024¤
Input˽integer˽2:˽395¤
The˽least˽common˽multiple˽of˽1024˽and˽395˽is˽404480¤
Input˽integer˽1:˽72¤
Input˽integer˽2:˽80¤
The˽least˽common˽multiple˽of˽72˽and˽80˽is˽720¤
Lab 1 AIC2100
18
Problem 5
Write a program that displays how many images can be stored on a given size USB drive. The
size of the USB drive is to be entered by the user in gigabytes (GB). The number of images that
can be stored must be calcaulted for GIF, JPEG, PNG, and TIFF image file formats. Follow the
below output format.
There are several notes you should follow in this problem.
Enter˽USB˽size˽(GB):˽1¤
˽11184˽image(s)˽in˽GIF˽format˽can˽be˽stored¤
˽18641˽image(s)˽in˽JPEG˽format˽can˽be˽stored¤
˽˽5965˽image(s)˽in˽PNG˽format˽can˽be˽stored¤
˽˽˽372˽image(s)˽in˽TIFF˽format˽can˽be˽stored¤
Lab 1 AIC2100
19
Problem 5
Assumption 1: All the images have a resolution of 800×600 pixels.
Assumption 2: The compression rate and color depth of each image format is set as below table.
Follow these steps to compute the total number of bytes required to sotre 1 image.
1. Compute number of pixels.
2. Compute number of bytes to represent lossless image (i.e., multiply color depth byte)
3. Compress the image (i.e., divide it by compress rate).
Format Color depth Compression
GIF 1 byte 5:1
JPEG 3 byte 25:1
PNG 3 byte 8:1
TIFF 6 byte 1:1 (n/a)
Lab 1 AIC2100
20
Problem 5
Note 1. Do not report partial images (e.g., 5.5 images). The number of image must be integer.
Note 2. You are allowed to use Python 3 math module (it is standard library) for this problem only.
Note 3. Assume that 1GB is 2
30 bytes.
Note 4. You can assume that USB size input is always positive integer.
Note 4. The number of images should be displayed in 6-digit fieldwidth (see example in slide 18)
Note 5. For larger USB drives, a fieldwidth of 6 may be insufficient to accommodate the number of
images. In such a case it is permissible to exceed the 6-digit fieldwidth (see below example).
Enter˽USB˽size˽(GB):˽64¤
715827˽image(s)˽in˽GIF˽format˽can˽be˽stored¤
1193046˽image(s)˽in˽JPEG˽format˽can˽be˽stored¤
381774˽image(s)˽in˽PNG˽format˽can˽be˽stored¤
˽23860˽image(s)˽in˽TIFF˽format˽can˽be˽stored¤
Lab 1 AIC2100
21
Marking Criteria
• Score is only given to programs that compile and produce the correct output with Python version
3.
• No points for programs that are named wrongly. Please refer to the following slide for the
required file names.
• Points are deducted for programs that produce warnings.
• Please pay particular attention to the requested output format of your programs. Deviating from
the requested output format results in points deductions.
Lab 1 AIC2100
22
Plagiarism
• Plagiarism (Cheating)
– This is an individual assignment. All or some submissions are checked for plagiarism.
• We will not inform you which problems will be checked.
– Once detected, measures will be taken for all students involved in the plagiarism incident
(including the ``source'' of the plagiarized code).
Lab 1 AIC2100
23
• Please prepare the files for the programming problems. The names of the files, their due
dates, and the archive file names are given in the table above.
• Please upload your archive file by the stated due date on LearnUs.
• Please pay attention to file names.
• Putting files into archives has been explained in the Lab 0 specification.
Deliverables, Due Date and Submission
Problem File name Due Archive name
1 lab1_p1.py
Monday
April 8, 2024,
23:59
lab1_<student id>.zip
2 lab1_p2.py
3 lab1_p3.py
4 lab1_p4.py
5 lab1_p5.py

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp






 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:COMP S380F代做、SQL語言程序代寫
  • 下一篇:COMP 330代做、Python設計程序代寫
  • 無相關(guān)信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區(qū)
    昆明西山國家級風景名勝區(qū)
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

    關(guān)于我們 | 打賞支持 | 廣告服務 | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    美女扒开腿免费视频_蜜桃传媒一区二区亚洲av_先锋影音av在线_少妇一级淫片免费放播放_日本泡妞xxxx免费视频软件_一色道久久88加勒比一_熟女少妇一区二区三区_老司机免费视频_潘金莲一级黄色片_精品国产精品国产精品_黑人巨大猛交丰满少妇
    男男做爰猛烈叫床爽爽小说| 久久精品—区二区三区舞蹈 | 免费黄色在线网址| www日本在线观看| 日本少妇xxxx| 国产美女免费网站| 国产在线综合视频| 日韩在线视频免费看| 少妇视频一区二区| 中文字幕视频观看| 国产精品伦子伦| 特级西西人体高清大胆| 成人涩涩小片视频日本| 粉嫩av懂色av蜜臀av分享| 午夜男人的天堂| 午夜av入18在线| 羞羞在线观看视频| www.av欧美| jlzzjizz在线播放观看| 师生出轨h灌满了1v1| 欧美日韩黄色网| 日韩av网站在线播放| 少妇特黄一区二区三区| 女同性恋一区二区三区| 香蕉视频在线观看黄| 国产喷水在线观看| 日日操免费视频| 久久成人激情视频| 91视频在线网站| 青青草视频成人| 中文字幕 亚洲一区| 高清中文字幕mv的电影| 在线成人精品视频| 色哟哟网站在线观看| 精品人妻一区二区三区免费| 欧美日韩黄色网| 破处女黄色一级片| 91视频免费在线看| 欧美人与性动交α欧美精品| 精品国产aⅴ一区二区三区东京热 久久久久99人妻一区二区三区 | 国产毛片久久久久久久| 大又大又粗又硬又爽少妇毛片| 亚洲精品乱码久久久久久不卡| 黑人玩弄人妻一区二区三区| 亚洲精品久久一区二区三区777| 性高潮免费视频| 中文字幕一区二区三区乱码不卡| 久久国产波多野结衣| 日韩欧美中文字幕视频| chinese全程对白| 亚欧精品视频一区二区三区| 日本少妇xxxxx| 一级性生活大片| 欧美熟妇一区二区| 久久精品老司机| 中文字幕乱码在线| 在线免费播放av| 亚洲国产果冻传媒av在线观看| 91传媒理伦片在线观看| 日本一卡二卡在线| 在线不卡av电影| 久久r这里只有精品| 91玉足脚交白嫩脚丫| 波多野结衣a v在线| 99热在线观看精品| a级一a一级在线观看| 夫妇露脸对白88av| 国产一卡二卡三卡四卡| 久久免费手机视频| 天天躁日日躁狠狠躁免费麻豆| av女人的天堂| 亚洲av午夜精品一区二区三区| 亚洲成人黄色av| 亚洲最大视频网| www.4hu95.com四虎| 一边摸一边做爽的视频17国产| 女人黄色一级片| xxxx日本少妇| 黑鬼狂亚洲人videos| 中国黄色片视频| 少妇视频一区二区| 玖玖爱在线精品视频| 91麻豆精品久久毛片一级| 性猛交╳xxx乱大交| 国产毛片欧美毛片久久久| 91日韩中文字幕| a天堂中文字幕| 日本成人在线免费| 国产精品久久久视频| 先锋资源在线视频| 亚洲女优在线观看| 91porn在线| 国产美女免费网站| 欧美 变态 另类 人妖| 精品人妻在线视频| 久久久国产精品久久久| 不卡的一区二区| 国产精品久久国产精麻豆96堂| 成年人网站免费看| 中文字幕视频观看| 老妇女50岁三级| 亚洲区 欧美区| 日韩精品电影一区二区| 一卡二卡三卡四卡| 欧洲一级黄色片| 欧美一区二区三区成人精品| 久久国产劲爆∧v内射| 免费看三级黄色片| 一级全黄裸体片| 毛茸茸free性熟hd| 欧美精品欧美极品欧美激情| 男男一级淫片免费播放| 喷水视频在线观看| 玖玖爱在线观看| 日本免费www| 青青青视频在线免费观看| 视频国产一区二区| 日韩视频中文字幕在线观看| 国产精品二区视频| 呦呦视频在线观看| x88av在线| 日韩影院一区二区| gv天堂gv无码男同在线观看| 国产成人精品无码片区在线| 视频免费在线观看| 亚洲狠狠婷婷综合久久久久图片| 醉酒壮男gay强迫野外xx| 无遮挡aaaaa大片免费看| 国产高潮呻吟久久| 久久精品国产亚洲AV成人婷婷| 青青草自拍偷拍| 91香蕉国产视频| 欧美图片自拍偷拍| 第一次破处视频| 三上悠亚 电影| 韩国女同性做爰三级| 国产黄色的视频| 人妻丰满熟妇av无码久久洗澡 | 日批免费观看视频| 黄色片网站免费| 97超碰免费在线观看| 粉嫩av蜜桃av蜜臀av| 久久国产高清视频| av网站有哪些| 91九色丨porny丨极品女神| 人妻丰满熟妇av无码久久洗澡| 香蕉久久久久久久| 亚洲一区二区三区四区五区六区| 成人性视频免费看| 久久人人爽人人爽人人片| 亚洲a∨无码无在线观看| 国产日韩视频一区| 一级片一级片一级片| 熟女少妇一区二区三区| 少妇伦子伦精品无吗| 一区二区三区在线播放视频| 五十路六十路七十路熟婆| 福利视频第一页| 国产成人精品无码免费看夜聊软件| 亚洲911精品成人18网站| 1024手机在线视频| jizz亚洲少妇| 在线看片中文字幕| a级在线观看视频| 日本人添下边视频免费| 日本中文在线视频| 欧美aaa级片| 91视频免费在观看| 性欧美一区二区| 亚洲自拍偷拍一区二区| 亚洲一级av无码毛片精品| 亚洲最大视频网| 亚洲精品鲁一鲁一区二区三区| 韩国av中国字幕| 亚洲色婷婷一区二区三区| 中日韩一级黄色片| 黄色香蕉视频在线观看| 亚洲av无一区二区三区| 亚洲自拍偷拍图| 国产毛片欧美毛片久久久| 丰满少妇一区二区三区| 国产男女猛烈无遮挡a片漫画 | 91导航在线观看| 九九热久久免费视频| 久久av红桃一区二区禁漫| 人妻人人澡人人添人人爽| 成人观看免费视频| 国产精品无码自拍| 一级欧美一级日韩片| 三级黄色片网站| 欧美熟妇激情一区二区三区| 国产jk精品白丝av在线观看| 黄免费在线观看| 日日噜噜夜夜狠狠久久波多野| 国产美女久久久久久| 精品伦一区二区三区| 日本japanese极品少妇| 我不卡一区二区| 国产在线a视频| 欧洲美一区二区三区亚洲|