Question: 1. Write a Kotlin program that declares two variables: one that stores a name as a string and another that stores an age as an

1. Write a Kotlin program that declares two variables: one that stores a name as a string and another that stores an age as an integer. Print out a string that contains those variables using string template. Example output: `Name = Nick and Age = 55`

2. Write a Kotlin program with declares a variable assigns it a value between 5 and 30. Print "good morning" if the variable is less than 12, "good afternoon" if the variable is between 12 and 18 and good evening if the variable is greater than 18.

3. Write a Kotlin program that contains two loops, (1) a for loop that prints out the numbers 1-10 and (2) a while loop that prints out the even numbers between 0 and 30.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!