Author: admin
Home > Articles posted by admin (Page 118)
Posted at 04:09h
in
Uncategorized
by admin
You can do Question 1~ 3 in Python IDLE:
Question 1.
Use float() to create a number from a string like ‘12.34’. Make sure the result is really a number!
Question 2.
Try using int() to create an integer from a decimal number like 56.78. Did the answer get rounded up...
Posted at 04:06h
in
Uncategorized
by admin
Question 1:
Use TKinter to create 6 buttons as following picture:
Question 2:
Use TKinter to create login window as following picture:
...
Question 1:
Please use for loop to create the multiplication table program. After asking which table the user wants, ask her how high the table should go. The output should look like this:
Sample Input:
Which multiplication table would you like? 7
How high do you want to go? 12
Sample Output:
Here’s...
Posted at 18:32h
in
Uncategorized
by admin
Question:
Annie has two favourite baseball teams: the Eagle and the Warrior. She has followed them throughout the season, which is now over. The season lasted for N days. Both teams played exactly one game on each day.
For each day, Annie recorded the number of runs scored by...
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...
Posted at 18:03h
in
Uncategorized
by admin
Question:
Find a picture online (best to be .png picture with transparent background) and save it into to the same folder of your python file. Then try to load this picture to the pygame window.
...
Question:Write a program which accepts as input a positive integer and checks, using the algorithm described below, to see whether or not the integer is divisible by 11. This particular test for divisibility by 11 was given in 1897 by Charles L. Dodgson (Lewis Carroll).
Algorithm:As...
Posted at 04:47h
in
Uncategorized
by admin
Question:Assume the postfix expression is a string of characters separated by spaces. The operators are *, /, +, and - and the operands are assumed to be single-digit integer values. The output will be an integer result. The following are the steps how to calculate...
Posted at 02:31h
in
Uncategorized
by admin
Question 1:
Write a function to print all the even numbers between 1 to 100. Please name the function whatever you like and don’t forget to call the function after you define it.
Question 2:
Make a function that will allow you to print any name, address, street,...
Question:
Write a function to print your name in big letters, make sure you enter the name in lower case, like this:
Please click and download the following file and finish the function....