日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > python >内容正文

python

intro to cs with python_CS 105 – Intro to Computing Non-Tech Spring 2019

發(fā)布時(shí)間:2024/9/15 python 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 intro to cs with python_CS 105 – Intro to Computing Non-Tech Spring 2019 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

CS 105 – Intro to Computing Non-Tech Spring 2019

Page 1 of 3

MP 7 – Extra Credit

In this MP, you will create 3 simple functions in one module. It is VERY important you name the module

and the functions exactly as you are instructed. If the names are not correct, you will get no credit.

1. The Module

Recall that in Python, all code in a single .py file (the sort that the IDLE editor saves) is called a module.

The NAME of the module is the bit before the ‘.py’. Therefore, a module named factorial would be

contained in a file named factorial.py. For this python MP, please name your module _mp7. My

netid is aharris, therefore, my module name would be aharris_mp7 and the file name would be

aharris_mp7.py. You will turn in that single file using the standard hand-in site. Note: There can be NO

spaces or non-alphanumeric characters other than the underscore (‘_’) in the module name.

2. General Instructions

These general instructions will be the same for each Python lab/MP. You will turn in a source file with your

functions in it. For this assignment, while you should use test cases, prior to turn in, you will comment out

each test case. Recall, in Python, comments are any line that starts with a ‘#’. For example, consider the

following code:

def func(a):

return a

print(func(‘Bob’))

This code snippet has one function, the function has one line (the return). The code also has one test case.

If you run this code in it, it will print ‘Bob’. To comment out the test case, you simply place a ‘#’ in front of

the test case line, so the code looks like the following:

def func(a):

return a

#print(func(‘Bob’))

Now if you run the code, it will load the function in memory, but print nothing.

CS 105 – Intro to Computing Non-Tech Spring 2019

Page 2 of 3

So, before you turn in your code, comment out all your test cases, but NOT your functions. If you comment

out functions, you will not get credit for those functions (because as far as the interpreter is concerned, they

don’t exist). The grading script will remove any print and input statements not commented out and this may

break your code and result in a 0.

Testing: Remember when testing your function, don’t just test using the single example test case provided

to you. Try to think of possible cases that will cause your function to break! For example, if the function is

supposed to take a single string as input, test it with a string containing spaces, punctuation, etc. If the

CS 105作業(yè)代做、代寫Python實(shí)驗(yàn)作業(yè)、Python程序語(yǔ)言作業(yè)調(diào)試、代做IDLE editor作業(yè)

function calculates an equation, pass in zero or negative numbers, or big numbers. If your function contains

loops or conditionals, test all edge cases of the conditionals and loops. The grading script will use between

five and ten test cases. You will not be given the test cases we choose prior to grading. It is part of your

assignment to come up with comprehensive testing. For the first few assignments, this will not be difficult.

3. Function One: countDown

Specification

The first function you will write should be called ‘countDown’. Your function should take zero (0)

arguments.

The function should return one (1) list containing integers from 10 to 1 and finally, the string “Liftoff!”. (i.e.,

[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, ‘Liftoff!’]).

You function must be recursive (i.e., it should contain a call to itself within the function body). You will get

NO credit if you use any loops (for, while, etc).

4. Function Two: myLSearch

Specification:

Assume you are given a sorted list of integers to search. Your job is to write a search algorithm to find the

index of a particular number.

CS 105 – Intro to Computing Non-Tech Spring 2019

Page 3 of 3

The second function you will write should be called ‘myLSearch’. Your function should take two (2)

arguments: an integer to search for and a sorted list of integers.

The function should return one (1) integer, the index in the input list containing the input integer. If the

input integer does not exist in the list, your function should return -1.

For credit, you MUST use either a for or a while loop. This search algorithm should NOT be recursive.

There should be no call to itself in the body of the function or you will get no credit.

5. Function Three: myRSearch

Specification:

Assume you are given a sorted list of integers to search. Your job is to write a search algorithm to find the

index of a particular number.

The third function you will write should be called ‘myRSearch’. Your function should take two (2)

arguments: an integer to search for and a sorted list of integers.

The function should return one (1) integer, the index in the input list containing the input integer. If the

input integer does not exist in the list, your function should return -1.

For credit, you MUST NOT use either a for or a while loop. This search algorithm MUST be recursive.

There should be at least one call to itself in the body of the function or you will get no credit.

因?yàn)閷I(yè),所以值得信賴。如有需要,請(qǐng)加QQ:99515681 或郵箱:99515681@qq.com

微信:codinghelp

與50位技術(shù)專家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖

總結(jié)

以上是生活随笔為你收集整理的intro to cs with python_CS 105 – Intro to Computing Non-Tech Spring 2019的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 午夜精品一区二区三区在线播放 | 精品动漫av| 成人午夜福利视频 | 日本视频免费观看 | 国产在线一区视频 | 一级黄色电影片 | 69亚洲| 青青草视频成人 | a级黄色在线观看 | 肉嫁高柳在线 | 日日草日日干 | 超碰日本 | 久久美利坚 | 亚洲乱码中文字幕久久孕妇黑人 | 欧美激情一区二区三区免费观看 | 91国内精品野花午夜精品 | 免费无码一区二区三区 | 国产欧美一区二区三区在线老狼 | 黄色片91 | 少妇免费视频 | 日韩城人免费 | 99re在线 | 亚洲欧美日韩精品色xxx | 午夜男人的天堂 | 曰女同女同中文字幕 | 999久久久精品 | 制服诱惑一区二区 | 超碰资源在线 | 精品久久香蕉国产线看观看亚洲 | 777精品久无码人妻蜜桃 | 老女人综合网 | 婷婷影音 | 日韩av在线播放不卡 | 亚洲福利午夜 | 国产视频亚洲 | 少妇免费毛片久久久久久久久 | 男女在线免费观看 | 久久精品一区 | 无码aⅴ精品一区二区三区浪潮 | 91污在线观看 | 波多野结衣视频观看 | 全部免费毛片在线播放一个 | 操操操综合网 | 深夜的私人秘书 | 国产不卡网 | 亚洲成人av影片 | 中文字幕制服诱惑 | 成人免费视频观看 | 欧美一级黄色录像 | 2019中文字幕在线免费观看 | 欧美日视频 | 国产成人精品一区二区三区网站观看 | 高清一区二区三区四区 | 人妻偷人精品一区二区三区 | 欧美日韩成人在线观看 | 九九久久久| 欧美黑人一级爽快片淫片高清 | 糖心vlog精品一区二区 | 日本不卡一区二区三区在线观看 | 草1024榴社区成人 | 久久精品国产熟女亚洲AV麻豆 | 激情综合激情 | 国产成人无码一二三区视频 | 肉视频在线观看 | 日韩91| 欧美三级视频 | 久久久久久中文字幕 | 97精品在线 | 日本在线三级 | 人人看超碰 | 亚洲精品三级 | 三点尽露的大尺度国产 | 免费在线黄网站 | 双性尿奴穿贞c带憋尿 | 久色视频 | 国产精品一区二区在线观看 | 亚洲天天操 | 91精品又粗又猛又爽 | 国产日韩欧美成人 | av导航大全 | 国产热 | 日本理论片 | 乱子伦一区二区三区 | 一区二区精品 | 午夜精品福利在线 | 国产成人在线免费观看视频 | 樱桃国产成人精品视频 | 国产另类专区 | 国产高清免费在线观看 | 91av在线免费 | 大屁股白浆一区二区三区 | 亚洲久久色 | 国产91久久精品一区二区 | 日韩中文字幕在线不卡 | 上原亚衣在线观看 | 欧美日韩在线免费播放 | 亚洲精品成人片在线观看精品字幕 | 首尔之春在线看 | 欧美图片一区二区 |