StupidBeauty
Read times:4226Posted at:Tue May 15 05:44:33 2018 - no title specified

Ruby练习:取数组中的头几个元素所组成的数组

写一段Ruby代码,取出以下代码中的df这个数组中头10个元素所组成的数组,并将它输出出来。

#!/usr/bin/env ruby

df = [ 1, "two", 3.0, 4, "five", 6.0, 7, "eight", 9.0, 10, "eleven", 12.0, 13, "fourteen", 15.0 ]

print("\n")

print(df)

print ( "\n" )

Your opinions
Posted at:Tue May 15 06:54:40 2018Chen Guanxi#/usr/bin/ruby text = [ 1, "two", 3.0, 4, "five", 6.0, 7, "eight", 9.0, 10,] print text
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4