Recall & Review
beginner
What is dynamic typing?
Dynamic typing means the type of a variable is checked at run-time, not before. You can change what kind of value a variable holds while the program runs.
Click to reveal answer
beginner
What does strong typing mean?
Strong typing means the language prevents mixing different types in ways that don't make sense, catching errors when you try to do that.
Click to reveal answer
intermediate
Is Ruby dynamically typed, strongly typed, or both?
Ruby is both dynamically typed and strongly typed. You don't declare variable types, but Ruby won't let you mix incompatible types without errors.Click to reveal answer
beginner
Example: What happens if you add a number and a string in Ruby?
Ruby raises an error because it is strongly typed and does not allow adding a number and a string directly.
Click to reveal answer
beginner
Why is dynamic typing helpful for beginners?
Dynamic typing lets you write code faster without worrying about types upfront. It feels like talking to a friend who understands what you mean.
Click to reveal answer
What does dynamic typing allow you to do?
✗ Incorrect
Dynamic typing means variable types are checked at run-time, so you can change what a variable holds while running.
What is a key feature of strong typing?
✗ Incorrect
Strong typing stops you from mixing incompatible types in ways that cause errors.
Which statement is true about Ruby's typing?
✗ Incorrect
Ruby checks types at run-time (dynamic) and prevents invalid type mixing (strong).
What happens if you try to add a number and a string in Ruby?
✗ Incorrect
Ruby raises an error because it does not allow adding a number and a string directly.
Why might dynamic typing be easier for beginners?
✗ Incorrect
Dynamic typing lets beginners write code without worrying about types upfront.
Explain the difference between dynamic typing and strong typing in your own words.
Think about when types are checked and how strict the language is about mixing types.
You got /3 concepts.
Describe how Ruby's typing system affects writing and running code.
Consider both the freedom and the rules Ruby gives you.
You got /3 concepts.