Question:
write a program to ask user about the date(year, month and day), then pass these year month and day as arguments to a function calcDay that return the day of the year.
Sample input:
Year: 2016
Month: 6
Day: 23
Sample output:
Day of the year: 175
Hint:
You need consider leap years and...
You could do the following homework using IDLE
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...
Question:
Input a string. You must using a stack, reverse the string and print it.
Sample Input 1:
Enter String to reverse : Apple
Sample Output 1
elppA
Sample Input 2
Orange
Sample Output 2
eganrO
...
Posted at 19:25h
in
Uncategorized
by admin
Question:
Make changes of the program by creating Enemy class, so we can create an enemy object in the main program, the enemy spaceship could complete the following tasks:
the enemy could appear at the top of the screen and bounce back and forth when it...
Question:
Rory is playing with an array A consisting of N integer elements indexed from 1 to N and a positive integer M. Rory will perform Q operations. Each operation is either type 1 or type 2.
Type 1 operation is in the form 1 l r x. You should add x to each element in A[l], A[l + 1],...
Posted at 19:19h
in
Uncategorized
by admin
Question:
Continue modify the program in the class, so the image can move diagonally (means it can move not only x position also y position.)
...