日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫ENGG1340、代做Python/C++編程語言
代寫ENGG1340、代做Python/C++編程語言

時間:2025-03-04  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



ENGG1340 Programming Technologies / COMP2113 Computer Programming II
Assignment 1
Deadline: 1 March (Saturday), 2025 23:59
General Instructions
Submit your assignment via VPL on Moodle. Ensure that your program can execute, and generate the required outputs in
VPL. Work incompatible with the VPL may not be marked.
For shell scripts (Problem 1 and 2), they must starts with the header #!/bin/bash, and will be executed using the Bash
shell on our standard environment.
As a developer, ensure that your code works flawlessly in the intended environment, not just your own. While you may
develop your work in your own environment, always test your program in our standard environment before submission.
Evaluation
For tasks requiring user input, utilize the standard input. Likewise, your program should output/print through the
standard output. Strict adherence to the sample output format is required, or your answer may be marked incorrect.
Your code will be automatically graded for technical correctness. Essentially, we use test cases to evaluate your
solution, failure to pass any of the test cases may result in zero marks. Partial credits are generally not given for
incomplete solutions as it may be challenging to objectively assess incomplete program logic. However, your work may
still be considered on a case-by-case basis during the rebuttal stage.
Additional test case will be used during grading. Scoring full marks on VPL does not ensure full marks in the assignment.
Sample test cases may or may not encompass all boundary cases. Designing proper test cases to verify your program’s
accuracy is part of the assessment.
Academic dishonesty
Your code will be cross-checked with other submissions and online sources for logical duplication. Note that providing
your work to others, aiding others in copying, or copying from others will be considered plagiarism, and will be dealt with
as per departmental policy. Please refer to the course information notes for more details.
Use of generative AI tools, like ChatGPT, is not permitted for all assignment.
Getting help
You are not alone! If you are stuck, post your query on the course forum. This assignment should be educational and
rewarding, not frustrating. We are here to help, but we can only do so if you reach out.
Please avoid spoilers on the discussion forum. Do not post any code directly related to the assignments. You are,
however, encouraged to discuss general concepts on the forums.
Submission
Deadlines are strictly enforced. Resubmission beyond the submission period will not be accepted.
Late Policy:
If you submit within 2 days after the deadline, 30% deduction.
If you submit within 3-5 days after the deadline, 50% deduction.
After that, no mark.
Problem 1: Count Substring Matches
Write a shell script that takes two command line arguments substring and file. It will count the words that contains
substring in file and produce the result.
Input:
The shell script does not read input from user. However, it expects two command line arguments substring and
file.
Output:
The script should list all words found, with the number of occurrences of that word in file. Refer to the sample
outputs for the exact format.
The words should be listed in descending order of the number of occurrences. For words with the same number of
occurrences, they should be listed in ascending order of their ASCII values.
The script should output nothing when there are fewer than two command line arguments specified or when the
file does not exist.
Assumptions:
The command line argument substring contains alphabets only. There will be no digits, symbols, or whitespace
characters in substring.
file, if exists, is a plain text file and is readable by all user.
The locale settings of the shell can affect the result of sorting. The shell script will be executed using Locale “C”. If
you are testing in your own Linux environment, please execute command export LC_ALL=C.UTF-8 to change the
locale settings accordingly.
Requirements:
For this question, a word is bounded by spaces or symbols, or by line boundaries (i.e., start of a line or end of a
line). For example, the string Gutenberg(TM)'s should be treated as three words Gutenberg, TM, and s.
Substring matching should be case insensitive. E.g., searching for tale should find TALE and tale.
On the other hand, when counting the number of occurrences of a word, it should be done in a case-sensitive
manner. E.g., TALE and tale should be counted separately.
Notes:
A file ebook.txt is provided for testing. A different file may be used when grading your work.
Study the man page of grep and sort to learn about possible options to use for this task.
There is no need to follow the exact amount of leading spaces shown in the sample outputs. Leading spaces will
be ignored in evaluation. If you are testing in your own environment, you can use flag -Bw of command diff for
comparison.
Sample Test Cases
1_1
Command: ./1.sh tale ebook.txt
Output:
3 TALE
2 Tale
1_2
Command: ./1.sh time ebook.txt
Output:
30 time
10 times
3 Sometimes
1 lifetime
1 oftentimes
1 sentiment
1 sometimes
1_3
Command: ./1.sh jerry ebook.txt
Output:
14 Jerry
1_4
Command: ./1.sh pokemon ebook.txt
Output: (it’s empty)
Problem 2: Credit card number validation
Write a Shell Script for validating credit card numbers using the Luhn algorithm.
The steps to validate a credit number using the Luhn algorithm are as follows:
1. Starting from the rightmost digit (that is the check digit), double the value of every second digit.
2. If the doubled value is a two-digit number, sum the digits of that number together to form a single digit.
3. Add all the 16 digits together.
4. If the final sum is divisible by 10, then the credit card is valid. If it is not divisible by 10, the number is invalid or fake.
For example, consider the credit card number 4512 3456 7890 1234. Applying the Luhn algorithm:
Double every second digit, starting from the right: 4, 6, 2, 2, 0, 18, 8, 14, 6, 10, 4, 6, 2, 2, 5, 8.
Sum all the resulting digits: 4 + 6 + 2 + 2 + 0 + 9 + 8 + 5 + 6 + 1 + 4 + 6 + 2 + 2 + 5 + 8 = 70.
Since 70 is divisible by 10, the credit card number is valid.
Input:
The shell script reads one credit card number from user.
Output:
The script should output a message reporting the validity of the credit card number. Refer to the sample outputs
for the exact format.
Assumptions:
You can assume that the input is always a 16-digit number, and each digit is in the range [0, 9]. There is no need to
consider invalid inputs.
Sample Test Cases (Inputs are shown in blue)
2_1
Enter the number for checking:
4512345678901234
The number 4512345678901234 is valid.
2_2
Enter the number for checking:
4512345678901235
The number 4512345678901235 is invalid.
2_3
Enter the number for checking:
1234567890123456
The number 1234567890123456 is invalid.
2_4
Enter the number for checking:
1234567890123452
The number 1234567890123452 is valid.

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



 

掃一掃在手機打開當前頁
  • 上一篇:質量流量計的信號輸出方式有哪些?
  • 下一篇:代寫EL2311、代做SQL編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        亚洲二区在线观看| 欧美图区在线视频| 欧美午夜精品伦理| 欧美日韩国产在线播放网站| 国产一区二区中文| 国产精品综合av一区二区国产馆| 久久久综合网| 久久女同精品一区二区| 亚洲在线一区二区| 欧美~级网站不卡| 欧美一区二区在线看| 一区二区免费在线播放| 99国产欧美久久久精品| 91久久国产综合久久蜜月精品| 一区免费在线| 欧美三级电影一区| 免费一级欧美片在线播放| 国产欧美日韩麻豆91| 精品白丝av| 亚洲人成在线观看网站高清| 国产日韩视频一区二区三区| 国产精品香蕉在线观看| 国产欧美精品一区二区色综合| 久久久国产精品一区| 国产麻豆一精品一av一免费| 欧美日韩妖精视频| 国产欧美日本| 亚洲美女免费精品视频在线观看| 一区二区三区久久久| 国产酒店精品激情| 在线一区免费观看| 欧美一级淫片aaaaaaa视频| 欧美日韩免费观看一区=区三区| 国产九九精品视频| 日韩小视频在线观看专区| 欧美一级二级三级蜜桃| 欧美视频观看一区| 午夜精品久久久久久久99樱桃| 欧美一区二区私人影院日本| 影音先锋亚洲电影| 国产乱肥老妇国产一区二| 国产精品成av人在线视午夜片| 亚洲裸体视频| 玉米视频成人免费看| 狠狠久久亚洲欧美| 亚洲欧洲精品一区二区精品久久久| 久久久久久久久一区二区| 亚洲视频一区二区| 欧美成人网在线| 老牛影视一区二区三区| 亚洲国产视频一区| 欧美成人精品激情在线观看| 欧美成人在线免费观看| 激情91久久| 日韩亚洲在线| 久久精品99| 日韩写真在线| 亚洲一区二区三区色| 欧美视频不卡| 久久这里只有| 欧美激情中文不卡| 欧美一级播放| 在线播放豆国产99亚洲| 久久视频在线免费观看| 欧美日韩一卡| 免费观看30秒视频久久| 国产精品久久一区二区三区| 中文av一区特黄| 国产精品视频男人的天堂| 欧美日韩性生活视频| 亚洲视频精选在线| 中国女人久久久| 欧美在线资源| 欧美精品午夜视频| 亚洲精品久久7777| 国产免费观看久久| 国产一级一区二区| 亚洲久久视频| 日韩亚洲精品视频| 久久aⅴ国产欧美74aaa| 日韩一级二级三级| 99精品久久| 欧美在线视频免费| 国产精品网站在线播放| 欧美国产精品劲爆| 国产精品亚洲综合久久| 伊人天天综合| 欧美大片网址| 亚洲精品九九| 韩国精品久久久999| 欧美亚州一区二区三区| 欧美激情欧美狂野欧美精品| 国产婷婷色一区二区三区在线| 久久久精品日韩| 欧美一级欧美一级在线播放| 国产综合自拍| 免费久久99精品国产自在现线| 国产视频一区三区| 欧美国产日韩亚洲一区| 欧美理论在线播放| 欧美日韩在线免费观看| 国产主播在线一区| 国内伊人久久久久久网站视频| 久久综合伊人| 牛夜精品久久久久久久99黑人| 国产精品成人va在线观看| 在线成人小视频| 欧美日韩美女| 欧美国产先锋| 亚洲国产日韩在线| 亚洲一区亚洲二区| 美玉足脚交一区二区三区图片| 99riav久久精品riav| 国产午夜亚洲精品不卡| 99re这里只有精品6| 亚洲精品一区二| 欧美日韩理论| 国产精品vvv| 欧美在线播放高清精品| 国语自产精品视频在线看8查询8| 久久久最新网址| 久久精品国产亚洲5555| 久久综合免费视频影院| 黄色成人av网| 蘑菇福利视频一区播放| 国模精品一区二区三区| 国产在线拍偷自揄拍精品| 欧美—级在线免费片| 夜夜嗨网站十八久久| 久久人人爽爽爽人久久久| 久久九九有精品国产23| 亚洲欧美日韩精品一区二区| 亚洲国产成人不卡| 国产一区二区中文字幕免费看| 国产精品地址| 国产精品久久久久久一区二区三区| 亚洲国产综合视频在线观看| 久久精品国产亚洲一区二区| 亚洲黄色在线观看| 欧美成人午夜视频| 亚洲国产精品女人久久久| 在线视频一区二区| 国产精品九色蝌蚪自拍| 久久免费视频这里只有精品| 国产精品一区亚洲| 亚洲人精品午夜在线观看| 欧美在线观看视频一区二区三区| 国产精品久久久久久久久久尿| 亚洲第一视频网站| 老司机aⅴ在线精品导航| 国产精品扒开腿做爽爽爽软件| 亚洲黄色精品| 亚洲娇小video精品| 亚洲国产精选| 久久精品日产第一区二区| 欧美成人综合网站| 欧美女激情福利| 国产午夜亚洲精品不卡| 亚洲午夜激情在线| 亚洲一区二区视频在线观看| 亚洲网站在线看| 欧美一级一区| 一本大道久久a久久精二百| 一本色道久久综合狠狠躁篇怎么玩|