19 Jun PMCA Saturday 18:30 Python Homework 21.06.12.
Question: Write code to draw the below pattern: 10101 01010 10101 01010 10101...
Question: Write code to draw the below pattern: 10101 01010 10101 01010 10101...
Question 1: Use TKinter to create 6 buttons as following picture: Question 2: Use TKinter to create login window as following picture: ...
Question 1: Create a Tank class which have the attributes of: name direction(use ‘up’, ‘down’, ‘left’ or ‘right’) x position and y position The class also have the following method: move (direction, steps) method can change the x or y position base on the direction and steps. it...
Question 1: Draw the following picture in the pygame window: (could be different color) Hint: using pygame.draw.circle Question 2: Draw below image using pygame. (could using different color) ...
Question 1 Given an array of strings as below: strArr = ["apple","banana","or","and","they","them","fighter"] Use any sorting algorithm to sort the array according to the size of the string. If the array contains multiple strings with the same length, you can order those strings in any order. Final Sorted array should...
Question: Input N numbers using scanner and find the Kth Smallest number in the array Sample Input 1: 10 (Hint: Value of N) 12 22 32 1 23 3 4 5 11 100 5 (Hint: Value of K) Sample Output 1: 11 (Hint: Sorted order is 1,3,4,5,11,12,22,23,32,100 so the 5th smallest number is 11) Sample Input 2: 5 (Hint: Value of N) 12 5 2 66 7 3 (Hint: Value...
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...
Question: You are gathering readings of acidity level in a very long river in order to determine the health of the river. You have placed N sensors (2≤N≤2000000) in the river, and each sensor gives an integer reading R (1≤R≤1000). For the purposes of your research, you would like to...
Question: You are gathering readings of acidity level in a very long river in order to determine the health of the river. You have placed N sensors (2≤N≤2000000) in the river, and each sensor gives an integer reading R (1≤R≤1000). For the purposes of your research, you would like to...
Question:You are gathering readings of acidity level in a very long river in order to determine the health of the river. You have placed N sensors (2≤N≤2000000) in the river, and each sensor gives an integer reading R (1≤R≤1000). For the purposes of your research, you would like to...