Question

This Python program will need to include the following items listed below. You are to customize your program and create the sequence in any order of your choice. Must include Python comments for each...

This Python program will need to include the following items listed below. You are to customize your program and create the sequence in any order of your choice.

  • Must include Python comments for each of the items shown below.
  • Calculate a Percentage. For example, the discount percentage on a sale item.
  • Use of 3 Constants. To be used for values that will not change throughout the life of the program.
  • A Turtle Graphic Logo. This logo will be used to depict your fictitious company and should be something interesting and creative.
  • Three (3) If-else Conditions.  The usage of conditions is required and should be used to evaluate or make a decision on some kind of input. These can include the comparison of Strings or depict a nested conditional sequence.
  • The Usage of at Least 2 Logical Operators
  • 2 While Loops.
  • 1 For Loop
  • At Least 2 Functions (1 with at least 1 parameter)
  • 1 Instance of a List + Looping Through the List
0 0
Add a comment Improve this question Transcribed image text
Answer #1


File Edit Search View Encoding Language Settings Tools Macro Run Plugins Window? import turtile wn-turtle.Screen () laugh- tu

34 35 36 37 38 for i in range (1,10,1): else: print(you are may be student at+pI0]+ 4in +p[1]) for loop print(1) #here p

print (add(1,2)) #passing arguments print (name (vishnu)) #passing arguments 67 68 69 70 71 72 73 74 75 76 #logical a=10 b-

source code in plain text:

import turtle
wn = turtle.Screen()
laugh= turtle.Turtle()
laugh.penup()
laugh.goto(-75,150)
laugh.pendown()
laugh.circle(10)  
laugh.penup()
laugh.goto(75,150)
laugh.pendown()
laugh.circle(10)  
laugh.penup()
laugh.goto(0,0)
laugh.pendown()
laugh.circle(100,90)
laugh.penup()          
laugh.goto(0,0)
laugh.pendown()
laugh.circle(-100,90)
p=("Rgukt","Nuzvid","Andhrapradesh") #declareing constant variables in tuple in tuple we didnt modify the values
Total_amount=int(input("Enter Total amount")) #take total amount aS INPUT
percentage=int(input("Enter your percentage")) #take percentage share
output_amount=(percentage/100)*Total_amount #output of the percentage amout he/she get
print(output_amount)

#if_else conditions
name=input("Enter your name")
if(name=="Chandhu"):
   print("you are administrator at "+p[0]+" "+"in "+p[1])
elif(name=="Raghu"):
   print("you are doctor at"+p[1]+" "+"in "+p[2])
elif(name=="madhu"):
   print("you are Teacher at "+p[1]+" "+"in "+p[2])
else:
   print("you are may be student at"+p[0]+" "+"in "+p[1])
  
#for loop
for i in range(1,10,1):
   print(i) #here print the values from 1 to 9 to iterate over the for loop
  
#while loop
i=0
while(i<10): #loop iterate to until i value <10 if the value >=10 it breaks
   print(i) #each iteration time print i value
   i=i+1 #increment the i value for iteration

#second while loop
i=1
while(i<=10): #here print 1 to 10 even and odd numbers print
   if(i%2==0):
       print(i,":even") #if i%2==0 it is even number so it will execute
   else:
       print(i,":odd") #if i%2==1 it will be odd number
   i=i+1
  
#instance list looping
list=[5,6,7,8,9]
for i in list: #iterate the values over the list
   print(i)
  
#two functions
def add(a,b): #declare the fucntion and pass two parameters
   return a+b #return sum of ther two parameters
def name(a):
   return a
print(add(1,2)) #passing arguments
print(name("vishnu")) #passing arguments

#logical operators
a=10
b=20
c=30
if(a<=b and a<=c):
   print(a,":smallest number")
elif(b<=a and b<=c):
   print(b,":smallest number")
else:
   print(c,":smallest number")

  


   #if you have any doubts comment below...

Add a comment
Know the answer?
Add Answer to:
This Python program will need to include the following items listed below. You are to customize your program and create the sequence in any order of your choice. Must include Python comments for each...
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
  • This Python program will need to include the following items listed below. You are to customize...

    This Python program will need to include the following items listed below. You are to customize your program and create the sequence in any order of your choice. Write in simple code. Must include Python comments for each of the items show below. Calculate a Percentage. For example, the discount percentage on a sale item. Use of 3 Constants. To be used for values that will not change throughout the life of the program. A Turtle Graphic Logo. This logo...

  • Design an original, professional web site following the specifications listed below. This web sit...

    Design an original, professional web site following the specifications listed below. This web site will be for a business you plan to set up for yourself or for someone else. The following is a detailed list of the requirements for your web site. READ them carefully. Instructions - Web Site Requirements for the web site: General: You will thoroughly test all your pages in more than one browser. All links MUST work. All graphics must show on the page. All...

  • Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file. You will need to decide on the following:

    Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file. You will need to decide on the following:How to format each dictionary item as a text string in the input file.How to covert each input string into a dictionary item.How to format each item of your inverted dictionary as a text string in the output file.Create an input file with your original three-or-more items and add at...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

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