合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

        CDS523編程代寫、代做Python程序語言
        CDS523編程代寫、代做Python程序語言

        時間:2024-11-20  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



        CDS523 Principle of Data Analytics and Programming
        Programming Assignment 3
        (Due: 20
        th November 2024, 23:59)
        1. (5 marks) In the past, the frequency analysis of letters was an important step in breaking cipher. Write a 
        Python program that prompt the user to input the path of a text file and output the occurrence count of 
        all 26 English alphabet (ignoring case) in the text file specified by the user.
        Sample input and output:
        Terminal
        Please enter the path of the text file: asg3_q1_sample.txt
        The frequency of English alphabet:
        a: 1
        b: 1
        c: 1
        … 
        z: 1
        You should output the count of every English alphabet one by one in alphabetical order. Each line should 
        contain an English alphabet followed by its count. The counts of some English alphabets in the sample 
        input and output are omitted to save space in this assignment specification but your program should 
        output the count of all English alphabets.
        2. (15 marks in total) In cryptography, a Caesar cipher is one of the simplest forms of substitution cipher. 
        The encryption is performed through shifting each letter in the plaintext forward by a number of posi tions defined by the user along the alphabetical order. For example, if the user has defined the number 
        of forward position shift to be 4, every letter E in the plaintext will be replaced by A in the ciphertext 
        because character A is 4 positions in front of letter E in alphabetical order.
        Consider the following mapping between each alphabet in plaintext and its corresponding alphabet in 
        ciphertext where the encryption is performed by shifting 4 alphabets forward.
        Plain A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
        Cipher W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
        Process of Encryption:
        Input plaintext:
        The quick brown fox jumps over the lazy dog.
        Encryption Process
        Plain T h e q u i c k b r o w n f o x j u m p s o v e r t h e l a z y d o g .
        ↓↓↓ ↓↓↓↓↓ ↓↓↓↓↓ ↓↓↓ ↓↓↓↓↓ ↓↓↓↓ ↓↓↓ ↓↓↓↓ ↓↓↓
        Cipher P d a m q e y g x n k s j b k t f q i l o k r a n p d a h w v u z k c .
        Output ciphertext:
        Pda mqeyg xnksj bkt fqilo kran pda hwvu zkc.
        Process of Decryption:
        The decryption of a ciphertext encrypted with Caesar cipher can be achieved by reversing the encryption 
        process (i.e. shifting the letters backward).
        Input ciphertext:
        Pda mqeyg xnksj bkt fqilo kran pda hwvu zkc.
        Decryption Process
        Cipher P d a m q e y g x n k s j b k t f q i l o k r a n p d a h w v u z k c .
        ↓↓↓ ↓↓↓↓↓ ↓↓↓↓↓ ↓↓↓ ↓↓↓↓↓ ↓↓↓↓ ↓↓↓ ↓↓↓↓ ↓↓↓
        Plain T h e q u i c k b r o w n f o x j u m p s o v e r t h e l a z y d o g .
        Output plaintext:
        The quick brown fox jumps over the lazy dog.
        a) (6 marks) Write a program that prompt the user to input (1) the number of forward position shift and
        (2) the plaintext message that they want to encrypt into the console. The program then output the 
        encrypted message to the console.
        Sample input and output:
        Terminal
        Please enter the number of position shift: 4
        Please enter the plaintext message: The quick brown fox jumps over the 
        lazy dog.
        The encrypted message is: Pda mqeyg xnksj bkt fqilo kran pda hwvu zkc.
        b) (5 marks) Modify the program in (a) such that it will prompt the user to input (1) the number of for ward position shift, (2) the path of the plaintext text file and (3) the path of the ciphertext text file.
        The program then encrypts the content of the plaintext text file and output the result ciphertext to 
        the ciphertext text file.
        Sample input and output:
        Terminal
        Please enter the number of position shift: 4
        Please enter the path of the input plaintext file: plaintext.txt
        Please enter the path of the output encrypted file: encrypted.txt
        c) (2 marks) Modify the program in (a) such that it will prompt the user to input (1) the number of for ward position shift and (2) the encrypted message that they want to decrypt into the console. The 
        program then output the decrypted plaintext message to the console.
        Sample input and output:
        Terminal
        Please enter the number of position shift: 4
        Please enter the encrypted message: Pda mqeyg xnksj bkt fqilo kran pda 
        hwvu zkc.
        The decrypted message is: The quick brown fox jumps over the lazy dog.
        d) (2 marks) Modify the program in (c) such that it will prompt the user to input (1) the number of for ward position for shifting, (2) the path of the ciphertext text file and (3) the path of the decrypted
        plaintext text file. The program then decrypts the content of the ciphertext text file and output the 
        result plaintext to the plaintext text file.
        Sample input and output:
        Terminal
        Please enter the number of position shift: 4
        Please enter the path of the input encrypted file: encrypted.txt
        Please enter the path of the output decrypted file: decrypted.txt
        Assumption:
        • Only English alphabet (upper case or lower case) characters have to be encrypted and decrypted. 
        • Characters other than English alphabet are preserve during the encryption and decryption.
        • Case of every English alphabet is preserved during the encryption and decryption process.
        Assumptions
        You may assume that every input of the program is valid in format.
        Submission
        Students should submit their source code as (1) a single Jupiter Notebook file (i.e. .ipynb file) OR (2) a zip file 
        that contains standalone Python script files (i.e. .py files) for answering the programing questions to the 
        submission box on the Moodle elearning platform on or before 20
        th November 2024, 23:59. Students are 
        expected to name their file submission in the name of <your_student_ID>_asg3.ipynb OR
        <your_student_ID>_asg3.zip and their source code should follow the following format:

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





         

        掃一掃在手機打開當(dāng)前頁
      1. 上一篇:ENGG1110代做、代寫c/c++語言編程
      2. 下一篇:24LLP109代做、代寫c/c++編程語言
      3. 無相關(guān)信息
        合肥生活資訊

        合肥圖文信息
        挖掘機濾芯提升發(fā)動機性能
        挖掘機濾芯提升發(fā)動機性能
        戴納斯帝壁掛爐全國售后服務(wù)電話24小時官網(wǎng)400(全國服務(wù)熱線)
        戴納斯帝壁掛爐全國售后服務(wù)電話24小時官網(wǎng)
        菲斯曼壁掛爐全國統(tǒng)一400售后維修服務(wù)電話24小時服務(wù)熱線
        菲斯曼壁掛爐全國統(tǒng)一400售后維修服務(wù)電話2
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國24小時客服熱線
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國24小時
        海信羅馬假日洗衣機亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
        海信羅馬假日洗衣機亮相AWE 復(fù)古美學(xué)與現(xiàn)代
        合肥機場巴士4號線
        合肥機場巴士4號線
        合肥機場巴士3號線
        合肥機場巴士3號線
        合肥機場巴士2號線
        合肥機場巴士2號線
      4. 幣安app官網(wǎng)下載 短信驗證碼 丁香花影院

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

        Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
        ICP備06013414號-3 公安備 42010502001045

        主站蜘蛛池模板: 日本一区午夜爱爱| 久久无码AV一区二区三区| 91麻豆精品国产自产在线观看一区| 无码AV天堂一区二区三区| 国产aⅴ精品一区二区三区久久 | 色偷偷av一区二区三区| 日韩A无码AV一区二区三区| 人妻少妇精品视频三区二区一区 | 亚洲美女视频一区| 国产精品丝袜一区二区三区| 一区二区三区四区在线观看视频| 精品一区二区ww| 少妇一晚三次一区二区三区| 中文字幕精品一区二区2021年| 亚洲一区二区三区高清| 国产伦理一区二区| 国产无码一区二区在线| 久久无码精品一区二区三区 | 国产精品亚洲午夜一区二区三区 | 国模私拍一区二区三区| 成人区人妻精品一区二区不卡视频 | 亚洲一区二区观看播放| 日韩人妻无码一区二区三区99 | 海角国精产品一区一区三区糖心 | 一区二区三区四区在线视频| 精品人妻一区二区三区四区 | av无码人妻一区二区三区牛牛| 精品一区二区三区色花堂| 久久久久国产一区二区 | 国产精品免费综合一区视频| 国产伦一区二区三区免费| 日本高清无卡码一区二区久久| 国产另类ts人妖一区二区三区| 国产一区二区三区精品视频| 消息称老熟妇乱视频一区二区| 国产精品一级香蕉一区| 正在播放国产一区| 激情内射亚州一区二区三区爱妻| 另类一区二区三区| 日本一区二三区好的精华液| 一区二区三区波多野结衣|