NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

GOAL OF THE PROJECT:
In Class 39, you created a rock-paper-scissors app using all the knowledge from your previous classes.

In this project, you will apply what you have learnt in the class to achieve the following goals.

Main Goal
Create a user interface of the It’ s Dicey Dicey app and add the code to make the first dice functional.
Additional Goal 1
Add the code to make the second dice functional.
Additional Goal 2
Display the sum of two variables.
STORY:
You have decided to call 3 of your friends to play monopoly. But both the dice which come with the game are missing in the game box. You have to make an app that simulates a double dice roll before your friends arrive.



PicPic

*This is just for your reference. We expect you to apply your own creativity in the project

GETTING STARTED:
Login to code.org
click on the following link Project Template
Click the Pic button.
Click on Remix
Rename the project to Project 39 and click on Save .
SPECIFIC TASKS TO ACHIEVE THE MAIN GOAL:
You have an empty project here. Create a User interface (UI) for the App.
Add the following elements
Set the properties of the design element as required.

Pic

When the user clicks on the Button “Roll me”:
Create a variable named number1 that stores the randomNumber values from 1 to 6.
Pic

Display the value of variable number1 in the label lbl_num1.
The images in image1 should appear to correspond to the numbers shown in the label lbl_num1.
The label that says “Total =” should show the sum of both the dice in the other empty label.
Create a variable that stores the sum of the two random variables and set it equal to its respective label (Total) on the screen.
Click the Run button to check if the code is working


*Refer to the images given above.
SUBMITTING THE PROJECT:
SAVE all the changes made to the project.
Click the Share button to generate a shareable link.
Copy this link and submit it in the Student Dashboard Projects panel against the correct class number.
HINTS FOR THE MAIN GOAL:1. Use the setNumber block and set the id to the label that you have created.

Pic
2. Use the randomNumber block and set it from 1 to 6. Put it in the setNumber Block in the “number” area.
Pic

Pic

3. Every image will have an id and a URL. The id identifies the image, the URL denotes the image itself. You will have to use the setImageURL block to update the image to the correct dice image. Please see the example below.

Example:
Pic
4. Finally, remember, you will have to use multiple “if” and “if else” condition blocks. Please see the example below for one example of an if-else if block to display the values.
Pic
ADDITIONAL GOAL 1:Great! Now it’s time to add the code to make our second dice functional.

Pic
SPECIFIC TASKS TO ACHIEVE ADDITIONAL GOAL 1:
Great! Now it’s time to add the code to make our second dice functional.
Create a variable named number2 that stores the randomNumber values from 1 to 6

Display the value of variable number2 in the label lbl_num2.
The images in image2 should appear to correspond to the numbers shown in the label lbl_num2.


Click the Run button to check if the code is working.


*SAVE all the changes made to the project and SUBMIT the shareable link in the Student Dashboard Projects panel against the correct class number.
ADDITIONAL GOAL 2:Let’s show the sum of both dices.
Pic
SPECIFIC TASKS TO ACHIEVE ADDITIONAL GOAL 2:
The label that says “Total =” should show the sum of both the dice in the other empty label
Create a variable that stores the sum of the two random variables and set it equal to its respective label (Total) on the screen.

Click the Run button to check if the code is working.


*SAVE all the changes made to the project and SUBMIT the shareable link in the Student Dashboard Projects panel against the correct class number.

*After running the code, the output should look like this
HINTS FOR ADDITIONAL GOAL 2:1. Refer to the following code screenshot to show the sum of both the dice.
Note that you have to add the correct values in the highlighted boxes.

Pic

After running the code, the output should look like this
ADDITIONAL GOAL 2tasks
Does the label lbl_total_num show the sum of both variables number1 and number2 when the Roll Me button(button1) is clicked?
10 pts
Display the sum of two variables.

ADDITIONAL GOAL 1tasks
Does the image2 show a random number of dice when the Roll Me button(button1) is clicked?
10 pts
Add the code to make the second dice functional.

Start Your Project

Read all the instructions carefully to understand the project

Click on "Start Project" to go to the project playground and start your project
Start Project
Submit Your Project
Learn how to submit your projectvideo
Paste your project URL
Submit Project
Additional Tasks
tasks
Does the label lbl_total_num show the sum of both variables number1 and number2 when the Roll Me button(button1) is clicked?

10 pts
View Details
Does the image2 show a random number of dice when the Roll Me button(button1) is clicked?

10 pts
View Details
Code.org Credentials
Username
[email protected]
Copy
Password
187094
Copy
Class Summary
This project is based on your last class INT-C39
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.