9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

新人研修課題

Posted at

Assign the variable x to the value 5.

What is the datatype of "Matt"?

x = 5
Is x a string?

What does this expression evaluate to?
"Cool".+("io")

What does this expression evaluate to?
"bob" + 42

a = "Bat"
b = "woman"
What does this expression evaluate to?
a + b

What does this expression print?
my_name = "50 Cent"
my_name = "Miley"
p my_name

rapper = "Jaydakiss"
Get the first letter from the string "Jaydakiss".

Get the first through 3rd elements from the "Jaydakiss" string.

Replace the "l" in the following string with "m":
word = "lace"

Assign the variable my_dawg to the value "DMX"

What does the following expression evaluate to?
"Dead Poet" = fav_bar

What does the following expression print?

something = "cats"
crazy = something
puts crazy

What does the following expression evaluate to?
3 + 4

What does the following expression evaluate to?
4 * 7

What does the following expression evaluate to?
2 ** 3

What does the following expression evaluate to?
8 / 2

What does the following expression evaluate to?
3 / 2

What does the following expression evaluate to?
3.0 / 2.0

What does the following expression evaluate to?
"i am not shouting".upcase()

Convert every letter of "YoLo BrAh" to lowercase.
nice = "YoLo BrAh"

Concatenate the following strings:
first = "Beautiful "
second = "face tattoo"

Integers have useful built-in methods too. Convert the number 5 to the string "5".

5.to_s
to_s stands for "to string"
What is the problem with the following code?
my variable = "Mr. White"

Update the code, so it can run successfully:
band = "Blink" + 182

9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?