Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The “T” from “Turing”. [0]
- The length of “Turing”.length
- Make the whole string capital letters.upcase
- Delete the “n” from “Turing”.delete("n")
- Assign “Turing” to a variable. school = Turing
- What does gets do? gets allows the user to input data
- What is the difference between the input without the .chomp and the input with the .chomp? Without chop you are actaully adding a new line with gets.chomp it removes the line from any new text.
- What does fav_num.to_i do? converts the number to an integer.
- What does animals.length return? 4 the length of the array
- What does animals[0] return? dog it is the position of the element
- What does animals.empty? return? false bc the array isn't empty.
- What are two different ruby commands that add to the animals ? push, (+), (<<)
- What ruby command is used to remove the last element from the array? pop
Add Comment
Please, Sign In to add comment