Gallery
Solution Variables in Action
Share
Explore
Solution Variables in Action

icon picker
The Task

Activity: Variables in Action 📄

This task is designed for 2 people working together.

Start Here

Run and explore the program, read the code and the comments.
Edit the program to create four new variable assignments to store: a. The years that each of you were born. b. The favourite food for each of you.
Add code to display the values in the format shown below. Pay attention to the data type of the values stored in the variables.
Good luck! 🍀

Sample Output

My favourite app is Among Us
I am A. My year of birth is 2010
I am B. My year of birth is 2011
I am A. My favourite food is Pizza
I am B. My favourite food is Pasta

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.