Question

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 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

Points to consider:

  1. We need to add the turtle functionality in it.
  2. We added three function into it, while loop and for loops.

Code

import turtle as t
import time
def function1(name):
    if name == 'John':
        print("You are allowed")
    elif name == 'Harry':
        print("You are allowed")
    else:
        print('You are not allowed')

    print("Following students are present")

def function2():
    print("Following are the students")
    for x in range(10):
        print(x)


def function3(list):
    print("Following are allowed for the party")
    for allowed in list:
        print(allowed)

i = 3
j = 2
hor_dis = 20
ver_dis = 25
while i != 0:
    t.forward(hor_dis)
    t.left(40)
    j = 2
    while j != 0:
        t.forward(ver_dis)
        t.right(30)
        t.forward(hor_dis)
        j -= 1
    i -= 1
time.sleep(1)
list = ['John', 'Harry']
name = str(input('Enter name'))
function1(name)
function2()
function3(list)



Code Snippet:

Sample Output

Friend, That was a nice question to answer
If you have any doubts in understanding do let me know in the comment section. I will be happy to help you further.
Please like it if you think effort deserves like.
Thanks

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 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 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...

  • Python Modify your program from Learning Journal Unit 7 to read dictionary items from a file...

    Python 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...

  • Word Bank: a) python b) computer science c) algorithm d) program e) interpreter f) compiler g)...

    Word Bank: a) python b) computer science c) algorithm d) program e) interpreter f) compiler g) syntax h) semantics i) value J) variable k) operator l) operand m) expression n) statement o) input p)output q)call r) arguments s) library t) bug u) variable scope v) local variable w)global variable x) variable lifetime y) relational operators z) logical operators 1) Compares operands and results in a bool: 2) The duration of a variable's existence: 3) A list of instructions to solve...

  • Need a program in python. Asterix and Obelix want to store and process information about movies...

    Need a program in python. Asterix and Obelix want to store and process information about movies they are interested in. So, you have been commissioned to write a program in Python to automate this. Since they are not very computer literate, your program must be easy for them to use. They want to store the information in a comma separated text file. Using this they would need to generate a report – see all items AND show a bar chart...

  • EI E 237 Assignment 4: Python Program Due September 18, 2018 Description For this assignment, you...

    EI E 237 Assignment 4: Python Program Due September 18, 2018 Description For this assignment, you will practice several basic Python programming skillis by writing a simple Python 3 program. This program will implement a text-based, 2-player rock-paper-scissors game (if you are unfamiliar with rock-paper-scissors, check out the Wikipedia article The program should give some brief instructions to the players. Next, it should prompt player for a choice, then prompt player 2 for a choice. If a player inputs something...

  • 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...

  • Python 3 IDE/AWS Problem You are tasked with writing a new program for your company that...

    Python 3 IDE/AWS Problem You are tasked with writing a new program for your company that keeps track of the customer’s information and his or her current bill. The company wants the name, address, phone number, and balance to be stored for each customer. This program will demonstrate the following: How to use a class to organize data How to use methods to access the data of a class How to create objects from a class Solving the Problem Step...

  • Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anythi...

    Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anything. No code outside of a function! Median List Traversal and Exception Handling Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen. Your menu should have 6 options 50% below 50% above Add a number to the list/array...

  • -----------Python program------------------- Instructions: For this assignment, you will write complete a program that allows a customer...

    -----------Python program------------------- Instructions: For this assignment, you will write complete a program that allows a customer to plan for retirement. Part 2: Generate a Retirement Planning Table: It's hard to decide how much you need to save for retirement. To help your customer visualize how long her nest egg will last, write a program that allows the user to generate a retirement planning table showing the number of months the savings will last for various combinations of starting account balance...

  • In this assignment you are asked to write a python program to maintain the Student enrollment...

    In this assignment you are asked to write a python program to maintain the Student enrollment in to a class and points scored by him in a class. You need to do it by using a List of Tuples What you need to do? 1. You need to repeatedly display this menu to the user 1. Enroll into Class 2. Drop from Class 3. Calculate average of grades for a course 4. View all Students 5. Exit 2. Ask the...

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