美文网首页
帮写Python语言程序、Python语言程序帮写、代做留学生P

帮写Python语言程序、Python语言程序帮写、代做留学生P

作者: xuezhouchun | 来源:发表于2019-03-09 15:26 被阅读0次

    PSBC Project 1Due 5pm Tuesday, March 5th 2019Question 1: The Euler-Mascheroni constantThe Euler-Mascheroni constant de ned as= limn!1lnn+nXk=11k!0:577215664901533is a mathematical constant frequently arising in number theory and special integrals. Despite itsappearance in many seemingly unrelated integrals and functions, the EulerMascheroni constantremains a mystery and is not as well-known as other mathematical constants like . Basicquestions like whether it is irrational or not are still open. In many situations, it is moreconvenient to approximate complicated constants like this by the quotient of integers. Findthe best such approximations p=q such that jp=q j is smallest among all possible positiveintegers p and q such that p+q is smaller than or equal to a given positive integer.Task: Write a function AppEM such that [p,q] = AppEM(N) returns the best pair of integersp and q, such that p+q is less than or equal to N. Record your result for N = 2019.Note: you can just copy the above value of the constant with fteen decimal points, other-wise you have to call the symbolic constant and convert it into double precision: em const =double(eulergamma). The rst few lines of your code look like:1 function [p,q] = AppEm(N)2 % APPEM Approximate the Euler-Mascheroni constant by the rational3 % number p/q, among all pairs of positive integers (p,q) such that p+q45 em_const = 0.577215664901533;Remark: (1) you can assume that N is a positive integer greater than one and there is no needto check the validity of the input; (2) if there are more than one pairs of numbers (for instance,when the input integer N is 6, both pairs [1;2] and [2;4] give the best approximation), returnthe pair with the smallest p+q.Question 2: Lucky numberAn integer n is said to be lucky, if it has only odd prime factors that are distinct (thus atleast two factors), and for any of its prime factor p, p 1 divides n 1. For example,a136 Any prime number is not lucky, because it has only one prime factor (itself)1a136 The number 6 = 2 3 is not lucky, because there is an even factor 2a136 The number 45 = 3 3 5 is not lucky, because the prime factor 3 appears twice (notdistinct)a136 The number 15 = 3 5 is not lucky, because 4(= 5 1) does not divide 14(= 15 1)a136 The number 10585 = 5 29 73 is lucky, because all the prime factors (5, 29 and 73)are odd and distinct, and105844 =10585 15 1 = 2646;1058428 =10585 129 1 = 378;1058472 =10585 173 1 = 147:Write a function luckynum such that luckynum(N) returns the smallest lucky number greaterthan or equal to N. Record your output for N = 2019. The rst few lines of your code look like:1 function n = luckynum(N)2 % LUCKYNUM Find the smallest lucky number that is greater than or equal to NHint: check the numbers equal to or greater than N one by one, and stop when the candidatenumber is veri ed to be lucky.Question 3: Perfect numbersAn integer n is said to be perfect, if its square consists all nine non-zero digits exactly once.Examples include 11826 and 30384, since118262 = 139854276; 303842 = 923187456:Find the perfect number n, such that n2 is closest to 360322019.1 function n = PerfNum(N)2 % PERFNUM returns n, such that n^2 is a perfect square number with all ninedistinct digits from 1 to 9,3 % which is closest to the input N, another nine digits number (can beassumed to be between 10^9 and 10^10-1)Information about the codinga136 Ask the lecturer or the lab demonstrators, if you need help on any commands, or whetherthere are built-in commands/functions to accomplish certain tasks (especially importantif you think you have a good approach to the questions, but do not know the relatedcommands).a136 You can assume that the input argument is always a positive integer, and no need tovalidate the input.a136 The default datatype is double (decimal number), and be aware of possible side e ectswhen using the numbers as integers.2a136 Remember that the same question can be solved by di erent approaches, and the sameapproach can be implemented in di erent ways. All relevant commands should be coveredduring the lectures or tutorial exercises, but you are free to explore own. Make criticaljudgement to choose the best approach/implementation.a136 Aim for e ciency of the code, which is an additional marking criteria, besides the genericrubric. Although you only need to record the answer for the given input, make surethat the computational time or memory does not increase signi cantly with larger inputparameters (these issues will be mentioned constantly during the class demonstrations).a136 List the complete code of the whole function at the end of each question, or in an appendix.Make your source code more readable, by keeping the indentation and stylistic features,and can be copied from the electronic le. Your result should be reproduced from thecode attached.Guidelines for the report1. Have a look at the generic rubric about how your report will be marked against, and alsothe intended learning outcomes about what you are expected to achieve in the end.2. Avoid copying (too many) sentences directly from the project description, and try torestate the problem with your own words or examples if possible.3. You may use your report in the future as evidences of written work, so take it seriously.4. Your target audience is a fellow student on your course: explain the questions so thatthe report can be understood without this project description and your approach canbe implemented in another computer language like Python. The report should indicateto the reader how well you understand the problem and the approach you take. Yourgoal will be to communicate your solutions to another person rather than to show you’vecompleted the assignment.5. Balance the explanation of the approach and the comments in the code. Avoid under-commenting and over-commenting.6. Aim for precision and clarity of writing (discussed in Week 5).7. Keep your page length not exceeding eight A4 pages, and there is no need for a title pagefor a relative short report like this.8. Since there is no nal exam, you are advised to spend at least 15 hours on each project.9. All reports are marked anonymously, and there is no need to put any personal informationon the report.10. The submission for each project will be open two weeks before the deadline, and you areencouraged to submit an early draft to see how Turnitin works on Blackboard. Only yourlast submission will be marked, and DO NOT submit anything after the deadline. Anylate penalty will be applied by the Teaching and Learning O ce in June according to theUndergraduate Student Handbook, and any extension has to be approved from the O cetoo (not from the lecturer).本团队核心人员组成主要包括硅谷工程师、BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

    相关文章

      网友评论

          本文标题:帮写Python语言程序、Python语言程序帮写、代做留学生P

          本文链接:https://www.haomeiwen.com/subject/chnspqtx.html