Question

Written for Python using simple coding. ((Starting out with python)) Make your own star on the...

Written for Python using simple coding. ((Starting out with python))

Make your own star on the hollywood walk of fame. Write a program that displays a star with your name displayed in the star.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the code below::


Each time it will run it will print star with a different color.

import turtle
import random
def draw_stars():
angle = 120
colors = ["red","green","blue","orange","purple","pink","yellow","gray","magenta"]
turtle.speed(0)
turtle.penup()
i = random.randint(0,len(colors)-1);
turtle.fillcolor(colors[i])
turtle.goto(50,130)
turtle.pendown()
turtle.begin_fill()
name="Your Name put here"
size = 200
for side in range(5):
turtle.forward(size)
turtle.right(angle)
turtle.forward(size)
turtle.right(72 - angle)
turtle.end_fill()
turtle.penup()
turtle.goto(-10*len(name),0)
turtle.write(name, move=False, align="left", font=("Courier", 20, "normal"))
turtle.Screen().exitonclick()
  
draw_stars()

output:

Add a comment
Know the answer?
Add Answer to:
Written for Python using simple coding. ((Starting out with python)) Make your own star on the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PYTHON Programming Exercise 2: Create a Simple Cost Calculator Write a program that displays input fields...

    PYTHON Programming Exercise 2: Create a Simple Cost Calculator Write a program that displays input fields (item name and cost) and calculates and displays the calculated costs. The program should do the following: Provide data entry areas for item name and cost. Calculate and display the subtotal of all items. Adds a sales tax of 6% and calculate and displays the total cost. Enter the following values into your program. Mother Board $200. RAM $75. Hard Drive $72. Video Graphics...

  • USING A PYTHON Write a program that gives simple math quizzes. The program should display two...

    USING A PYTHON Write a program that gives simple math quizzes. The program should display two random numbers that are to be added, such as: 247 + 129 The program should allow the student to enter the answer. If the answer is correct, a message of congratulations should be displayed. If the answer is incorrect, a message showing the correct answer should be displayed.

  • Starting out with python 4th edition Write program that lets the user enter in a file...

    Starting out with python 4th edition Write program that lets the user enter in a file name (numbers.txt) to read, keeps a running total of how many numbers are in the file, calculates and prints the average of all the numbers in the file. This must use a while loop that ends when end of file is reached. This program should include FileNotFoundError and ValueError exception handling. Sample output: Enter file name: numbers.txt There were 20 numbers in the file....

  • python Make another code block that creates a list using range( ) with 8 values starting...

    python Make another code block that creates a list using range( ) with 8 values starting with 1. print out your list Create a set from each of the three lists. Find the elements in common between the three sets.

  • Using java Part A Make a list of random items in your nodes. (Simple nodes with...

    Using java Part A Make a list of random items in your nodes. (Simple nodes with item an int) Print out this list. Write a method to put this list in order, either smallest to largest or largest to smallest (item) Print of the list Part B. Make a list of the modified Bicycle nodes (added age and gender to the Bicycle class) // did it Print out the list with the name, age and gender for each node. //did...

  • Using Python write a program that reads an int N >= 0, then prints out each...

    Using Python write a program that reads an int N >= 0, then prints out each of the following patterns of *. If you do NOT use the string repetition operator * in either problem, you will earn 0.25 points of Extra Credit for each. Also, each pattern must be output via a single function call to the given named function with single parameter N. Examples for N==4 follow, with explanations of how the displayed diagram reflects this value of...

  • Please answer this question as if you have NO coding experience. Develop a Python application that...

    Please answer this question as if you have NO coding experience. Develop a Python application that incorporates using appropriate data types and provides program output in a logical manner. Your program should prompt a user to enter a car brand, model, year, starting odometer reading, an ending odometer reading, and the estimated miles per gallon consumed by the vehicle. Store your data in a dictionary and print out the contents of the dictionary. I'm this far but cannot get it...

  • This is python coding recursive function question. Could anyone help me figuring out these not using...

    This is python coding recursive function question. Could anyone help me figuring out these not using built-in function? Thanks. Write a recursive function factorial(n) that returns the value of n!=1⋅2⋅3⋅⋯⋅n. 2. Write a recursive function reverse(text) that returns the reverse of the string named text. 3. Write a recursive function countUpper(s) that returns the number of uppercase letters in the string s. 4. Write a recursive function equal(list1, list2) that returns a Boolean value indicating whether the two lists are...

  • Write a code using python to make an Agenda that can store values such as Name,...

    Write a code using python to make an Agenda that can store values such as Name, Address and Phone number of 10 digits Name format First, Last Address Format Street, Number Zip City ST. Country phone format (###) ###-#### This program should give the option of adding a new contact or Display all the contacts you have stored by typing New Contact or Display Contacts

  • using C++ Write a full program (starting from #include) that takes as input the number of...

    using C++ Write a full program (starting from #include) that takes as input the number of seconds after midnight. It then displays the time in hours:minutes:seconds format. Assume the time is displayed in military time, e.g. 06:06:06 or 23:05:57. Note the placement of the zeros for numbers less than 10, which your program should properly display. Your program should show output as in the example below. Enter number of seconds after midnight: 3601

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT