179k views
5 votes
Guys if i dont do this i cant graduate this semester

easy python 20 pts also you can just do one you dont have to do both

In this program, prompt the user to enter a vowel. If they keep typing something other than a vowel... keep prompting them until they finally enter a vowel. Once they finally enter a vowel, tell them how many times it took them to properly enter a vowel. Specifically:

Setup your program with comments included
Prompt the user to type in a vowel.
Create a count variable to keep track of guesses
While the letter they enter is NOT a vowel {upper or lower case), tell the user, "That is not a vowel" and prompt them again to enter a vowel.
After the while loop, if the user entered a vowel on their first attempt, output "You entered a vowel on your first try!" or else, output, "It took you [count] tries to enter a vowel...sad"
HINT: Using the lower() or upper() method might save you some typing in your while condition


Create another program called Unit10FinalPractice2.py

In this program, you are going to create a turtle graphic program that will draw a circle that gradually increases in size, however many times the user specifies. Specifically:

Create your program, including comments
Import the turtle module and add the stop command at the end
In between, create a turtle and screen
Change the color of the screen, shape of the turtle and color of the turtle
Prompt the user using numinput for a number between 1 - 20
Using a for loop, repeat the number of times the user entered above (**NOTE - you will need to typecast this as an int() since their input will be a float()**)
Inside the loop, draw a circle (that gets filled in) that increases in size each time through the loop. **use a new method called circle(#), where the number represents the radius of the circle**
HINT - use the variable from the for loop multiplied by or added to another number to help create an increasing larger circle

User JSmyth
by
7.5k points

1 Answer

3 votes

Answer:

Step-by-step explanation:

import turtle

# Ask the user for the number of times they want the circle to increase in size

times = int(input("How many times do you want the circle to increase in size? "))

# Create a turtle object

t = turtle.Turtle()

# Use a for loop to draw the circle multiple times

for i in range(times):

# Increase the size of the circle by 10 each time

t.circle(10*i)

# Keep the turtle window open

turtle.mainloop()

User Rintaro
by
7.5k points