Basics Flashcards
1
Q
prints on the screen without an extra blank line.
A
2
Q
prints on the screen with an extra blank line.
A
puts
3
Q
takes user input and adds an extra blank line.
A
gets
4
Q
takes user input without adding an extra line.
A
gets.chomp
5
Q
string interpolation.
A
#{variable} ex. my_name = "Mina" puts "I am called #{my_name}!" >> I am called Mina!
6
Q
override a value using a method.
A
! ex. my_name = "mina" my_name.capitalize! puts my_name >> Mina
7
Q
gives the length of string or array.
A
length
8
Q
turns all letters of a string to upper case.
A
upcase
9
Q
turns all the letter of a string to lower case.
A
downcase
10
Q
capitalizes the 1st letter of a string and keeps the rest in a lower case.
A
capitalize