-
-
Save udacityandroid/a00cf27969aea4ba7848 to your computer and use it in GitHub Desktop.
Android Development for Beginners : Practice Set 2 Shopping List 2 Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int raspberryPrice = 5; | |
display1("1 box: $" + raspberryPrice); | |
raspberryPrice = 10; | |
display2("2 boxes: $" + (raspberryPrice)); | |
display3("3 boxes: $" + (raspberryPrice * 3)); |
Correct Answer
Click On No than
1 box: $5
2 boxes: $10
3 boxes: $30
katherine is best
the goal wasn't accomplished and it displayed
1 box: $5
2 boxes: $10
3 boxes: $30
I wrote just the price without adding the number of boxes
1 box: $5
2 boxes: $10
3 boxes: $30
This is the answer an not :
$5
$10
$30
or
5
10
30
Great it Works Totally guys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you struggle in latest version of Android Studio check below codes
JAVA CODE:
package com.example.android.practiceset2;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
}
XML CODE: