Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

Python Question

Description

In this we are going to combine what we have been doing with turtle and the math library, functions, and random.

Here is a piece of starter code:

import math

import turtle

import random

# Starter Code

def randomTurtle():

for count in range(10):

choice = random.randint(1,2)

if (choice==1):

turtle.forward(random.randint(5, 50))

elif(choice==2):

turtle.right(random.randint(1,359))

def testTurtle():

turtle.forward(100)

turtle.left(90)

turtle.forward(100)

# Call this when turning it in

randomTurtle()

# Call this when testing to make sure you have the correct answer

testTurtle()

You are going to create a new function to tell how far the turtle has travelled. Your function will be defined as:

def distance(x, y):

It will need to return the distance back to the main program which you will print out. I would suggest using the testTurtle function to see if it is working. If it is working correctly, you will get 141.42 as the correct answer. When you turn it in, do NOT call testTurtle in your code.

To get the turtle’s position you can use

turtle.xcor()
turtle.ycor()

Rubric

1 – Name/Class/Assignment Comment

1 – Comments/Code Style/Output

1 – Including a call to the randomTurtle Function from starter code

1 – Creates function distance that takes in two values

1 – Calls function distance that takes in the position of the turtle

3 – Uses a math function to calculate the distance

3 – Returns the correct value

2 – Prints out the returned value

{IN ANOTHER FILE}

During my time as an undergraduate student at UCF, I enrolled in 4-5 courses a semester. When I would enroll using myUCF I would enroll in one class at a time. Once, I tried to enroll into six courses and it told me I was unable to do so. This wasn’t a technical limit, but a limit the university had placed on me. If I dropped a class, I would be able to enroll into the new class.

The Program

You are going to write a program that will ask the user which class they would like to take. They will input that class as a string. Your program should be able to handle both names of the class (Topics in Computer Science) or the course code (COP 2500C). After you insert the course in the list, you need to print out the course schedule. If you already have 5 courses in your list, you will print out the course schedule with the new class as the 6th course and ask the user which one they want to drop. They can input 6 to drop the one they just put in. You will need to not let the user put in any other number other than the 1-6, and will continue to prompt them until they put one in. The program ends when the user types in “EXIT” for the course name.

Rubric

1 – Header with name, course, date, assignment
1 – Style/Output/Comments
1 – Creates a list to store courses in
1 – Creates a loop that ends when exit is inputted
2 – Insert a course to the list within the loop
5 – Prints out the context of the list after each insert
1 – Checks if the list is too large and prompts for deletion
4 – Deletes the chosen course out of the list
2 – Keeps prompting until user choses a valid index range

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20