modgasil.blogg.se

Greenfoot examples
Greenfoot examples








greenfoot examples
  1. #Greenfoot examples how to#
  2. #Greenfoot examples install#
  3. #Greenfoot examples mod#
  4. #Greenfoot examples full#
  5. #Greenfoot examples series#

If a negative number is encountered mid-way, the program should terminate, and print the sum so far. The negative one is not to form part of the sum.

#Greenfoot examples series#

Input a series of positive (>=0) numbers, ended by a negative one.Print the total of the following numbers. (eg the input might be: 4 33 52 67 83 - where the count is 4) Input a count, which specifies how many numbers will follow it.Look at the pseudocode example for playing monopoly look also at the link for one person's move, now using these rules: Write pseudocode to calculate the average age of people in a class.

#Greenfoot examples mod#

8 MOD 5 = 3.(ie 8 divided by 5 has 3 'leftover'). Hint in computing, the MODULO function will return the remainder after dividing one number by another. Write pseudocode to determine if an integer (number) number is odd or even. Write pseudocode to take two integers from a user and display the sum and the product (ie the number are multiplied together) of the numbers.

  • Input 10 numbers, and print their total - but any numbers>100 should be ignored, i.e should not be summed.
  • Input 10 numbers, and print their total.
  • (use for) BUT if start is bigger than finish, swap over their values so they are now in the proper order, then print the integers as specified.
  • Input 2 values into the variables: start and finish, then print the integers from start to finish inclusive.
  • BUT, if start is bigger than finish, don't print the numbers: an error message instead!.
  • Print the numbers 1 to 100 inclusive with a for loop.
  • Print the numbers 1 to 100 inclusive- with a while loop.
  • Simple (Perhaps slightly more difficult!) Problems #2 Write an algorithm to solve this problem.

    #Greenfoot examples full#

    The automatic barrier will prevent display appropriate full messages if the spaces are taken.

  • Input 3 numbers, and print the biggest.Īnother car park has 200 places for cars and 30 for motorcyles.
  • Input 3 numbers and print either an "all 3 equal" or a "not all equal" message.
  • Produce an error message if the length is negative.

    greenfoot examples

    Input the length of the side of a square, and print its area.Input the dimensions of a rectangle and print area and perimeter.Input the dimensions of a rectangle and print its area.Your pseudocode needs to be able to calculate the final price that a customer will pay, including GST.

    greenfoot examples

    For example, the price of hard drives (excluing GST) is discounted as follows The car park has 110 places.Īn online computer parts retailer has a discount scheme if customers buy multiple items of a part in the same order. Write an algorithm that will display this message. We will not need to remember everything we learn at this point as we will be visiting these concepts several times.Įssential Questions Produce pseudocode to solve the following problems:Ī car park has an entry barrier and displays a “Car Park Full” message when all the spaces have been taken. We are going to look at this in a little more detail now. Most of us probably think we already know what computer programming is.

    #Greenfoot examples install#

    Greenfoot is freely available for you to download and install on your own computer. The Greenfoot website is a rich source of more information on all things Greenfoot! Greenfoot will allow you to learn simple Java in a way that will interest and motivate you. Java is a very common programming language that is used worldwide to make computer programs and also in internet-based technologies. It can be tricky, and you will have to concentrate and learn from your mistakes, but Greenfoot will help you understand the concepts of computer programming.

    greenfoot examples

    Greenfoot uses the Java programming language as a base to enable simple games to be created.Ĭomputer programming is often thought of as difficult to learn. In particular, Greenfoot has been specially designed for young programmers aged 13 years and up. Greenfoot is an environment for computer programming. * Understand why Greenfoot is great for beginning programmers Objectives * Understand what Greenfoot is

  • 6.13.2 Solution to the solar water heater problem.
  • #Greenfoot examples how to#

  • 6.13.1.2 Questions - how to write the pseudocode - if you get stuck on any point, move on to the next.
  • The temperature sensors are shown in green, one in the collector and one in the tank.Scenario and Background Information
  • 6.13.1.1 Diagram of a typical solar hot water system.
  • 6.10 Some more slighty difficult problems.
  • 6.5 Simple (Perhaps slightly more difficult!) Problems #2.
  • 5.1.2 Pseudocode to calculate weekly pay.
  • 5.1.1 For example, pseudocode for baking a cake might be:.
  • 4.2 Activity: First Steps with Greenfoot.
  • 4.1 Getting Started - a simple introduction to programming using Greenfoot.









  • Greenfoot examples