06 Aug Thursday Online Python Homework 08.01
Question: Write a Python class to find the three elements that sum to zero from a set of n real numbers. Input Sample: -25, -10, -7, -3, 2, 4, 8, 10 Output Sample: [-10, 2, 8], [-7, -3, 10]...
Question: Write a Python class to find the three elements that sum to zero from a set of n real numbers. Input Sample: -25, -10, -7, -3, 2, 4, 8, 10 Output Sample: [-10, 2, 8], [-7, -3, 10]...
Question: Write a Python class to find the three elements that sum to zero from a set of n real numbers. Input Sample: -25, -10, -7, -3, 2, 4, 8, 10 Output Sample: [-10, 2, 8], [-7, -3, 10]...
Question: Use input() to take 10 input from user, each item is separated by space. Then try to complete the following task: Create a list from the input Delete all repeated elements of the list. Sample Input 1: 1 2 3 2 1 3 98 98 67 Sample...
Question : write a program to ask user about the date(year, month and day), then calculate the day of the year. Sample input: Year: 2016 Month: 6 Day: 23 Sample output: Day of the year: 175 Hint: You need consider leap years and non leap years, in order to do easier calculation, you may...
Question 1: Create a Tank object which have the attributes of: name direction(up/down/left/right) x position and y position The object also have a method: move (direction, steps) Using __init__ to Initial the tank to make sure it start from x position of 0 and y position of 0 Use print(tank...
Question: Write a program to ask the user for five names. The program should store the names in a list, and print them all out at the end. It should look something like this: Sample input: Enter 5 names: Tony Paul Nick Michel Kevin Sample output: The names are Tony, Paul, Nick, Michel, Kevin Hint: You can use...