Basics Flashcards

1
Q

prints on the screen without an extra blank line.

A

print

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

prints on the screen with an extra blank line.

A

puts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

takes user input and adds an extra blank line.

A

gets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

takes user input without adding an extra line.

A

gets.chomp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

string interpolation.

A
#{variable}
ex. 
my_name = "Mina"
puts "I am called #{my_name}!"
>> I am called Mina!
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

override a value using a method.

A
!
ex.
my_name = "mina"
my_name.capitalize!
puts my_name
>> Mina
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

gives the length of string or array.

A

length

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

turns all letters of a string to upper case.

A

upcase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

turns all the letter of a string to lower case.

A

downcase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

capitalizes the 1st letter of a string and keeps the rest in a lower case.

A

capitalize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly