Gallery
Debug 3.3. Variable Type
Share
Explore
Debug 3.3. Variable Type

icon picker
The Task

Activity: Debug 3.3 Variable type 🐞

Start Here

A bug report has been has been submitted on this program. The program should ask the user their name and their age. The program looks good except it won’t run and there seems to be a problem at the start with the variable types. There may be more errors though! Can you help fix it?
Run the program to identify errors.
Refer to the code clips below to help you fix the errors.
Right click on your code and add a comment explaining what was wrong and how you fixed it.

Expected output

Please enter your name? Duke Java
Please enter your age? 15

Name: Duke Java
Age: 15
Good luck! 🍀
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.