PMCA Friday Python CCC
Home > PMCA Friday Python CCC (Page 10)
Question 1:
Modify the program we made in the class. Make sure you can close window when the game over window shows. You can find code from following link:
Friday shooting Game2
If you do not have the sound file, please download the following sound for this game:
shoot.wav
explosion.wav
bluespace.mp3
Question...
Question:
Modify the program we made in the class. Add starting screen as below, the real game will start when play click the mouse in the range of the "PLAY" button. (Scroll down for more hint)
You can also download the code from the following link:
Friday shooting...
Question:
Eric works in a door mat manufacturing company. One day, he designed a new door mat with the
following specifications:
◦ Mat size must be A x B. (A is an odd natural number, and B is 3 times A.)
◦ The design should have 'WELCOME' written in...
Question:
Modify the program we made in the class. Add one enemy spaceship to your program, the enemy spaceship will keep moving from left to right and right to left side of the screen.
You can also download the code from the following link:
Friday shooting Game
You can...
Question:
Make a program to verify whether the credit card numbers from ABCD Bank are valid or not.
A valid credit card from ABCD Bank has the following characteristics:
It must start with a 4, 5 or 6.
It must contain exactly 16 digits.
It must only consist...
Question:
You are given a string . Suppose a character 'a' occurs consecutively n times in the string. Replace these consecutive occurrences of the character 'a' with (n, 'a') in the string.
Input Format: A single line of input consisting of the string .
Output Format: A single line of...
Please make some modifications of the following code. Make ball appears on the top when the ball reaches the bottom, and appears at bottom when the ball reaches the top.
sss...
Question:
Write a function luckySum(a, b, c) to calculate sum of given 3 int values, a b c. The function will have a return value of their sum. However, if one of the values is 13 then it does not count towards the sum and...
Question:
Draw the following picture in the pygame window: (could be different color)
Hint: using pygame.draw.circle
...
Question:
Using function or object method to write a program to return the number of times that the string
"code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.
For example:
'aaacodebbb' will have 1 "code"
'codexxcode' will have 2 "code"
'cozexxcope'...