Question

In: Computer Science

Q8) Draw a twelve-pointed star. code and run from PYCHARM. Q9) Write a program that prompts...

Q8) Draw a twelve-pointed star. code and run from PYCHARM.

Q9) Write a program that prompts the user to enter the radius of the rings and draws an Olympic symbol of five rings of the same size with the colors blue, black, red, yellow, and green. code and run from PYCHARM.

Solutions

Expert Solution

8)

source code:

import turtle
top=turtle.Turtle()
for i in range(12):
       theta=180.0-180.0/12
       top.forward(60)
       top.right(theta)
       top.forward(60)
input("")

#Output:

9)source code:

import turtle
def olympic_Sysmbol(radius):
   top =turtle.Turtle()
   top.pensize(3)
   color1= ["blue", "black", "red"]
   radius=100
   for i in range(3):
       top.penup()
       top.pencolor(color1[i])
       top.goto(i*110, 0)
       top.pendown()
       top.circle(radius)
   color2= ["","yellow", "","green"]
   for i in range(1,4,2):
   top.penup()
   top.pencolor(color2[i])
   top.goto(i*55, -50)
   top.pendown()
   top.circle(radius)
   input("")

a=int(input("Enter Radius of the circle"))
olympic_Sysmbol(a)

#output:

#if you have any doubts comment below...


Related Solutions

Part A In PyCharm, write a program that prompts the user for their name and age....
Part A In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold: What is your name? Amanda How old are you? 15 Hello Amanda! You were born in 2005. Write the program. Format your code using best practices. Refer to the zyBooks style guide, if needed, to use proper naming...
This needs to be a python3 code Write a program that prompts the user like this:...
This needs to be a python3 code Write a program that prompts the user like this: “Currency to convert to U.S. dollars: e = Euros, c= Chinese Yuan, r = Indian Rupees, b = Bitcoin: ”. Then depending on which letter the user enters, the program displays “Amount of Euros/Yuan/Rupees/Bitcoin to convert: ”. (Note: the second prompt should only name the one currency the user asked to convert, not all four currencies.) After the user enters the amount, the program...
Write a program/code that prompts the user for a minimum min and a maximum max. Then...
Write a program/code that prompts the user for a minimum min and a maximum max. Then use these values to print the squares of all even numbers between the min and max variables. (WRITTEN IN C) For example if the user enters 6 as the minimum and 200 as the maximum, the program/code should print the following. Enter limit on minimum square: 6 Enter limit on maximum square: 200 36 64 100 144 196
Write a C program/code that prompts the user for a minimum min and a maximum max....
Write a C program/code that prompts the user for a minimum min and a maximum max. Then use these values to print the squares of all even numbers between the min and max variables. For example if the user enters 6 as the minimum and 200 as the maximum, the program/code should print the following. Enter limit on minimum square: 6 Enter limit on maximum square: 200 36 64 100 144 196
Please code C# 8. Write a program that prompts the user to enter an integer. The...
Please code C# 8. Write a program that prompts the user to enter an integer. The program then determines and displays the following: Whether the integer is divisible by 5 and 6 Whether the integer is divisible by 5 or 6
Write a program that prompts a user for an integer from 1 to 99 and prints...
Write a program that prompts a user for an integer from 1 to 99 and prints it as an amount in words. The program will loop in case the user wants to input an additional number. If the user enters -99, the program will exit. Example: Input: 89 Output: Eighty nine Input: 45 Output: Fourty five Input: -99 Output: Have a nice day. <program exits> For this project, you are to: 1) You should validate any data coming from the...
Write a program that prompts a user for an integer from 1 to 99 and prints...
Write a program that prompts a user for an integer from 1 to 99 and prints it as an amount in words. The program will loop in case the user wants to input an additional number. If the user enters -99, the program will exit. Example: Input: 89 Output: Eighty nine Input: 45 Output: Fourty five Input: -99 Output: Have a nice day. <program exits> c++ project. need help.
Write a program that prompts the user to enter an integer from 1 to 15 and...
Write a program that prompts the user to enter an integer from 1 to 15 and displays a pyramid, as shown in the following sample run: here............THE PYRAMID HAS TO BE THIS SHAPE AND IT IS DONE IN JAVA PLEASE 7 6 5 4 3 2 1 2 3 4 5 6 7 6 5 4 3 2 1 2 3 4 5 6 5 4 3 2 1 2 3 4 5 4 3 2 1 2 3 4...
Write a program that prompts the user to input their first name from the keyboard and...
Write a program that prompts the user to input their first name from the keyboard and stores them in the variable "firstName". It does the same for last name and stores it in the variable "lastName". It then uses strcat to merge the two names, separates them by a space and stores the full name into a string variable called "fullName". In the end, the program must print out the string stored within fullName. ANSWER IN C LANGUAGE ! You...
write this program in C++ Write a program that prompts a user for three characters. The...
write this program in C++ Write a program that prompts a user for three characters. The program must make sure that the input is a number 10 - 100 inclusive. The program must re prompt the user until a correct input is entered. Finally output the largest and the lowest value. Example 1: Input : 10 Input : 20 Input : 30 The largest is 30. The lowest is 10. Example 2: Input : 100 Input : 50 Input :...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT