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.
Points to consider:
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
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. 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 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) 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...
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...
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...
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.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 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 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...
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...