Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Programming. Please help! The Leap Frog Sequence is a progressive mathematical algorithm that starts with three Integer values (A, B and C) then calculates

Python Programming. Please help! image text in transcribed
image text in transcribed
image text in transcribed
The "Leap Frog Sequence" is a progressive mathematical algorithm that starts with three Integer values (A, B and C) then calculates an increasing numeric sequence until C exceeds a target value. The Skipper Sequence equation is: newC = 5C - 3A + 2B To utilize the Leap Frog Sequence, start by determining the target value Calculate the value of newC using the equation provided above Assign the values of B and C A and B Assign the value of new C Repeat until the value of C exceeds the target The purpose of this algorithm is to count the number of cycles necessary for C to exceed the target value. The Assignment: Write a Python program that includes a function named alb that accepts four (4) arguments: the target, A, B and C. The function should use the Skipper Sequence algorithm to determine the number of cycles required for C to exceed the target value. Your Python program should following the course standards: Include an appropriate header including your name and a short description It should be fully documented with pseudocode comments All commands should be within the gib() function The output values and formatting should precisely match the examples provided The purpose of this algorithm is to count the number of cycles necessary for C to exceed the target value. The Assignment: Write a Python program that includes a function named qlb () that accepts four (4) arguments: the target, A, B and C. The function should use the Skipper Sequence algorithm to determine the number of cycles required for C to exceed the target value. Your Python program should following the course standards: Include an appropriate header including your name and a short description It should be fully documented with pseudocode comments All commands should be within the cib() function The output values and formatting should precisely match the examples provided . . . Your program should accomplish the following: Display a short description of the program's function (see examples) Display a blank line Define a while loop that repeats until the value of C exceeds the target Count the number of cycles (repetitions) required Display the results (see examples) LABISMICO. >>> 916(5000,5,2,9) This function determines the number of "Leap Frog Sequence cycles are necessary for C to exceed the target value. Target C value of 5000 exceeded after 4 Leap Frog Sequence cycles. Ending values: A: 182 B: 951 C: 5017 >>> q1b(100,1,2,3) This function determines the number of Leap Frog Sequence cycles are necessary for C to exceed the target value. Target C value of 100 exceeded after 3 Leap Frog Sequence cycles. Ending values: A: 16 BA 80 C: 423 >>>> 216(100000, -10,5,1) This function determines the number of Leap Frog Sequence! cycles are necessary for a to exceed the target value. Target value of 100000 exceeded after 6 Leap Frog Sequence cycles Ending values: A: 6024 B31778 C: 167497

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ c. What happens to investment in Oceania?

Answered: 1 week ago