How to combine functions and if statements

Assignment Help Basic Computer Science
Reference no: EM13828031

IT111-4: Recognize the programming constructs of functions.

Instructions:

Use the skater you created for the Unit 4 assignment. Add 2 cones to the ice that the skater will skate around in a figure 8. See Exercise 6-2 Exercise 7 and 8 as an example. You will first check the skater's position and use that information in making the decision whether the skater should begin her turn. You will demonstrate that you understand how to combine functions and if statements.

Requirements:

1. The skater from Unit 4 assignment is placed on a new pond with two cones.

2. Student uses a function to check the skater's distance from the cones (any one of several functions might be used here).

3. Student uses an if statement to determine when the skater is close enough to begin a half circle turn around the cone.

4. When the condition of the if statement is true, the skater begins a half turn around the cone.

5. Final output of the code is that the skater completes a figure 8.

 

 

Reference no: EM13828031

Questions Cloud

The database developer for a local colleg : Suppose that you are the database developer for a local college. The Chief Information Officer (CIO) has asked you to provide a summary of normalizing database tables that the IT staff will use in the upcoming training session.
Find the probability that the ice cream was sold on a cone : The problem relates to Basic Statistics and it is about computing the sales of ice cream flavors of chocolate, vanilla and strawberry. The problem is to determine the probability of selling an ice cream in cone with vanilla flavor
Taxable income-current income tax expense : Calculate taxable income, current income tax expense, deferred income tax expense, and the ending balances in the deferred tax accounts and valuation allowances.
Apply programming design concepts through creation : The task is to animate a cat chasing a mouse as it tries to get close enough to catch it (within 1 foot). Of course, as the cat continues to chase the mouse, the mouse is also running away and moves to random positions, trying to lose the cat. You wa..
How to combine functions and if statements : Use the skater you created for the Unit 4 assignment. Add 2 cones to the ice that the skater will skate around in a figure 8. See Exercise 6-2 Exercise 7 and 8 as an example. You will first check the skater's position and use that information in maki..
What proportion of accidents involved alcohol : This problem relates to Basic Statistics and it is about a study on accidents occurring due to driving and drinking. The proportion of drunken driving with single vehicle has been calculated. What proportion of accidents involved alcohol and a sing..
Financial planning law or future of financial advice law : How does our understanding of the theory base of Financial Planning Law assist in the effective drafting of laws to protect investors from this kind of behavior?
Integrating scoreboards in an organization : Integrating Scoreboards In An Organization
Investment advisor misleads clients : This question is from Finance and it explains a scenario where an investment advisor misleads his clients in investing in a company's shares whose prices have been falling.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create two-page written analysis for problem statement

Create a two-page written analysis based on the following specification: Problem statement, Possible outcomes if no action taken (this one is mine and the only thing i have to do) Alternative actions.

  What are the main differences between efs and bitlocker

The customer privacy data policy in your company's data classification standard requires encryption in two places: data stored in a user's personal data folders and data stored on the LAN's shared disk drives. Describe your solution for meeting th..

  Managing a merger

Imagine you work for Quality Corporation (Quality.ad) who has just recently bought Crescent Inc. (Crescent.ad) in a recent merger. Quality and Crescent have separate offices in St. Louis (Quality HQ), Little Rock, and Austin (Crescent HQ). Crescen..

  Create powerpoint presentation

Insert a title slide including your name, course, quarter, and professor's name. Insert a picture of the person or of something that relates to the person, and include the name of the person you admire. Note: You may use / search the Internet to in..

  Discuss windows and mac os

Apple's Mac OS is a major competitor for Windows, and many people feel very strongly about choosing one over the other. For this assignment, locate articles online that discuss the differences between Windows and Mac OS. You may discuss any recent..

  Write a program that reads the data in the file and displays

Write a program that reads the data in the file and displays the car number, miles driven, gallons used and the miles per gallon for each car.

  Write a letter of interest to a prospective employer listing

Look up a job that you want to have after college, write a letter of interest to a prospective employer listing: Who you are?What skills you have that are relevant for this job?Why you are interested in the job?

  Explain what happens when the reference to abstract class

Explain what happens when the reference to the abstract class X is used to execute method M1( ). X obj = new Y( ); obj.M1( );

  Neighbor solicitation and neighbor advertisement messages

Describe its essential purpose, how it works, and anything that is interesting about it in your initial post.

  What type of malware attack is this

What type of malware attack is this and what vulnerability is she trying to exploit in order to get her malware code past the network firewalls of these companies?

  Find one article on computer or information technology

Find one article on computer or information technology

  What networking-communications changes were in past decades

What networking and communications changes were introduced in the past decade (2000s), and what were their implications?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd