Posted at 18:37h
in
Uncategorized
by admin
Question:
write a program to ask user about the date(year, month and day), then calculate 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 non leap years, in order to do easier calculation, you may create...
Posted at 21:34h
in
Uncategorized
by admin
Question 1:
Use while 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...
Posted at 23:12h
in
Uncategorized
by admin
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...
Posted at 02:21h
in
archives
by admin
Question:
We have learned how to create 5 enemy spaceship at once in the class. Try to modify the game we made in the class:
The program will keep creating new enemy spaceship.
the new enemy spaceship always shows on the top of the screen but...
Question 1:
Today in gym class, your class decided to play dodgeball, and Jack is selected as one of the team captains! N students are lined up in a row, waiting to be put on teams. Jack is allowed to pick multiple students as long as they are...
Posted at 01:23h
in
Uncategorized
by admin
Question:
Please use stack knowledge to solve the following question:Balanced parentheses means that each opening symbol has a corresponding closing symbol and the pairs of parentheses are properly nested. Consider the following correctly balanced strings of parentheses:
(()()()())(((())))(()((())()))
Compare those with the following, which are not balanced:
((((((())()))(()()(()
Write an...