18 Jun Aurora Saturday 18:00 Python Homework 20.06.13.
Question: Use TKinter to create 6 buttons as following picture: ...
Question: Use TKinter to create 6 buttons as following picture: ...
Question: The factorial function (symbol: !) says to multiply all whole numbers from our chosen number down to 1. Examples: 4! = 4 × 3 × 2 × 1 = 24 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040 1! = 1 Factorial is not defined for...
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...
Question: Continue to program the code we made in the class at the bottom of this page. Try to use for loop to create buttons from 1-9, so the tkinter window would display as below: Hint:You can use "for i in range(1, 10):" or "for i in...
Continue with the code in the previous class and change the code such that the circle moves in both x direction and y direction. ...
Question: Try to modify the pygame we made in the class, so that your fighter can continuously fire laser as following picture, you can download laser image from http://www.torontokidscomputer.com/code/python/ or you can draw your own laser image. ...
Question: Write a function to calculate the total value of some change—quarters, dimes, nickels, and pennies. The function should return the total value of the coins. Then write a program that calls the function. The output should look like this when it runs: Sample input: quarters: 3 dimes: 6 nickels: 7 Sample output: total is $1.70 Class review: ...
Question 1 Make a variable and assign a number to it (any number you like). Then display your variable using print. Question 2 Modify your variable, either by replacing the old value with a new value, or by adding something to the old value. Display the new value using print. Question 3 Make another...
Question: Use TKinter to create following window with three buttons: the “blue” button will print “blue” in the python shell screen the “red” button will print “red” in the python shell screen if left mouse button click the “color” button will print “blue” in the python shell screen, while...
Draw below image using pygame Code to draw a rectangle is pygame.draw.rect(screen,[red,blue,green],[x,y,width,height,1]...