Posted at 05:20h
in
Uncategorized
by admin
Question:
Most likely, you will notice that you have a mouse attached to your computer, which lets you move the cursor around the screen. Your job is to get between the mouse and the cursor.
Suppose that the bottom left-hand corner of your screen is (0,0), and...
Question:
A series of streams run down the side of a mountain. The mountainside is very rocky so the streams split and rejoin many times. At the foot of the mountain, several streams emerge as rivers. Your job is to compute how much water flows in...
Question:
We have made the code in the class so that the barbarian could move towards bottom right and bounce inside the game window. Please make some modifications to the code so we could make the barbarian appears on the top instead of bouncing when the...
Posted at 05:06h
in
Uncategorized
by admin
Question 1:
Your hero has 4850 gold and start with level 1. Write a program to ask if you would like to spend 200 gold to upgrade your hero to a new level each time. If you agree to upgrade your hero, show hero’s new level and gold left over after...
Posted at 05:02h
in
Uncategorized
by admin
Question:Steve has a string of lowercase characters in range ascii[‘a’..’z’]. He wants to reduce the string to its shortest length by doing a series of operations. In each operation he selects a pair of adjacent lowercase letters that match, and he deletes them. For instance,...
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...