最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

iOS移動應(yīng)用程序開發(fā) | 第二講-變量、常量和數(shù)據(jù)類型:Swift by Na

2023-01-08 11:34 作者:陳鵬宇老師  | 我要投稿

?
01:33:33
?

第二次作業(yè)

作業(yè)一:完成Playgrounds App《學(xué)習(xí)編程1》4-7章


作業(yè)二:完成下面的練習(xí)題

1. Consider the following array, containing a collection of our favorite pizzas:

Create a new Playground and write some code to do the following:

(i) Create this array, as a variable, storing the pizza names in it.

(ii) Print the element of the array that contains "Vegetarian".

(iii) Append the pizza "Pepperoni" to the array, without changing the rest of the array.

(iv) Insert a new pizza, "Ham, Pineapple, and Pesto", at index 2, shuffling everything after along by one index.

(v) Remove the "Cheese" pizza from the array entirely, leaving the rest intact.

(vi) Swap the "Prosciutto" pizza for a "Pumpkin and Feta" pizza, without changing the rest of the array.

(vii) Print out the whole array.


2. Consider the following questions about sets, and see if you can figure out the answer. Then run them in a Playground to find out.

(i)

What would be printed?

(ii)

What’s in this collection?

(iii)

What’s in this set?

(iv)

What does forbiddenPizzas contain now?


3. Consider the following dictionary, representing a bunch of dessert pizzas and the quantities that have been ordered:

Using Swift code, print the quantity of Rocky Road, and the quantity of Caramel Swirl. And then add a new order for 17 Banana Split pizzas.

iOS移動應(yīng)用程序開發(fā) | 第二講-變量、常量和數(shù)據(jù)類型:Swift by Na的評論 (共 條)

分享到微博請遵守國家法律
静乐县| 吉林市| 金坛市| 仪陇县| 土默特左旗| 米脂县| 伊宁市| 云南省| 卢氏县| 高州市| 临沭县| 辽源市| 前郭尔| 广南县| 福州市| 托里县| 成都市| 高阳县| 桐城市| 五原县| 安丘市| 三都| 苍南县| 乃东县| 子长县| 勃利县| 文安县| 房山区| 葵青区| 海南省| 远安县| 游戏| 乐陵市| 玉山县| 静安区| 南和县| 和政县| 泰兴市| 兰州市| 郓城县| 多伦县|