精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

AIC2100代寫、Python設(shè)計程序代做

時間: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設(shè)計程序代寫
  • 無相關(guān)信息
    昆明生活資訊

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

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

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

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      一区二区免费看| 一区二区久久久久久| 欧美性猛片aaaaaaa做受| 99久久综合99久久综合网站| 国产成a人亚洲| 国产精品18久久久久久久久 | 国产福利一区在线| 国产在线播放一区二区三区| 精品一区二区综合| 高清不卡一区二区| eeuss鲁片一区二区三区在线观看| av电影在线观看不卡| 色狠狠色狠狠综合| 欧美精品乱人伦久久久久久| 欧美一级免费大片| 国产欧美日产一区| 亚洲激情五月婷婷| 麻豆精品在线看| 东方aⅴ免费观看久久av| 99精品国产99久久久久久白柏| 97久久超碰国产精品| 欧美日韩国产精品成人| 26uuu亚洲综合色欧美| 最新欧美精品一区二区三区| 五月天一区二区| 国产一区高清在线| 91福利国产成人精品照片| 欧美一区二区三区白人| 欧美高清在线视频| 亚洲高清中文字幕| 国产成人啪免费观看软件| 一本色道久久综合亚洲91| 欧美一区二区三区免费大片| 中文字幕精品在线不卡| 石原莉奈一区二区三区在线观看| 国产乱国产乱300精品| 欧美在线不卡视频| 日本一区二区视频在线| 亚洲国产精品一区二区www在线| 久久精品久久综合| 在线国产电影不卡| 国产精品国产三级国产普通话99| 偷偷要91色婷婷| 色偷偷久久人人79超碰人人澡 | 中文字幕av一区二区三区高| 亚洲午夜免费电影| 成人av电影观看| 精品88久久久久88久久久| 亚洲午夜影视影院在线观看| 成人免费毛片app| 久久综合资源网| 天天综合网 天天综合色| 成人高清免费在线播放| 欧美精品一区二区三区蜜桃| 图片区小说区国产精品视频| 色88888久久久久久影院按摩| 国产精品日韩成人| 国产精品主播直播| 精品久久久久久综合日本欧美| 亚洲午夜激情网站| 一本一本久久a久久精品综合麻豆| 国产视频一区在线播放| 国产精品一品二品| 久久综合九色欧美综合狠狠 | 亚洲免费观看视频| 不卡的av电影| 国产精品家庭影院| 成人高清伦理免费影院在线观看| 久久九九99视频| 国产福利一区二区三区| 久久丝袜美腿综合| 国产精品白丝jk黑袜喷水| 精品国产sm最大网站| 精品综合久久久久久8888| 日韩欧美中文一区| 黑人巨大精品欧美黑白配亚洲| 日韩一级大片在线| 国产一区欧美二区| 国产精品无圣光一区二区| 成人激情动漫在线观看| 成人欧美一区二区三区1314| 色综合久久综合网| 亚洲国产精品久久久久婷婷884| 欧美日韩精品福利| 蜜桃精品视频在线| 国产三区在线成人av| 风间由美一区二区av101| 亚洲视频免费观看| 欧美电影一区二区| 国产成人综合网| 中文字幕一区二区三| 欧洲生活片亚洲生活在线观看| 日日摸夜夜添夜夜添国产精品| 日韩写真欧美这视频| 国产精品自拍网站| 一区二区三区毛片| 日韩欧美国产高清| 波多野结衣一区二区三区| 亚洲综合图片区| 精品国产99国产精品| 99re热这里只有精品视频| 午夜精品久久久久久久| 久久亚洲综合色一区二区三区| 99久久久久久| 捆绑调教美女网站视频一区| 亚洲国产成人私人影院tom| 欧美日韩大陆在线| 国产成人av一区| 日韩一区欧美二区| 国产精品国产三级国产普通话蜜臀| 欧美综合一区二区三区| 国产91精品久久久久久久网曝门| 亚洲一区二区三区四区中文字幕 | 99久久久精品| 久久精品国产秦先生| 最新高清无码专区| 久久这里只精品最新地址| 欧美三级视频在线观看| 丰满少妇在线播放bd日韩电影| 五月激情丁香一区二区三区| 中文字幕一区二区5566日韩| 91精品国产黑色紧身裤美女| 一本一道久久a久久精品综合蜜臀| 麻豆精品一区二区综合av| 亚洲综合一区二区精品导航| 欧美激情一区二区在线| 日韩免费观看高清完整版 | 亚洲猫色日本管| 久久综合九色综合久久久精品综合| 91蜜桃在线免费视频| 国产成人av电影在线| 日本欧美肥老太交大片| 亚洲一区二区免费视频| 综合激情成人伊人| 国产精品午夜在线观看| 久久青草欧美一区二区三区| 欧美一卡2卡3卡4卡| 欧美日韩综合在线| 91福利视频久久久久| 91免费观看在线| 91久久免费观看| 色综合久久88色综合天天免费| av在线不卡观看免费观看| 国产一区二区影院| 国产精品一二三| 国产成人免费视频精品含羞草妖精| 国内精品久久久久影院色| 久久国产福利国产秒拍| 激情综合色播激情啊| 狠狠色综合日日| 国产夫妻精品视频| 成人av在线资源网站| 波多野结衣中文字幕一区| 99久久久久免费精品国产| 97精品久久久久中文字幕| 色诱亚洲精品久久久久久| 91成人免费网站| 在线成人小视频| 欧美mv日韩mv亚洲| 欧美国产在线观看| 日韩一区在线播放| 亚洲高清不卡在线| 男人的j进女人的j一区| 麻豆一区二区99久久久久| 国产综合久久久久久鬼色| 国产成人av电影在线播放| 99riav一区二区三区| 欧美日韩在线播放三区| 精品少妇一区二区三区在线视频| 国产日韩欧美高清| 亚洲精品视频一区| 日本va欧美va精品发布| 国产精品99久久久| 在线视频国内自拍亚洲视频| 欧美一二区视频| 中文字幕一区日韩精品欧美| 亚洲一区在线免费观看| 久久国内精品视频| 91女厕偷拍女厕偷拍高清| 欧美高清视频一二三区| 亚洲国产精品成人综合| 亚洲国产精品久久一线不卡| 国产麻豆一精品一av一免费| 91香蕉视频在线| 日韩你懂的在线观看| 亚洲欧洲精品一区二区精品久久久| 亚洲高清视频的网址| 国产精品一区二区三区四区| 欧美色大人视频| 日本一区二区不卡视频| 婷婷综合五月天| 99re8在线精品视频免费播放| 日韩欧美色综合网站| 亚洲精品精品亚洲| 国产黑丝在线一区二区三区| 欧美日本免费一区二区三区| 中文字幕不卡在线观看| 精品亚洲porn| 欧美精品丝袜中出| 一区二区久久久久|