Author: admin
Home > Articles posted by admin (Page 51)
Posted at 15:46h
in
Uncategorized
by admin
Question:
Write a program to print out a calendar for a particular month given the day on which the first of the month occurs together with the number of days in the month.
Your program should take as input an integer representing the day of the week...
Question:
A company's network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order to minimize traffic between parts.
Jack hacked into the company's network and decided to reassign computers to maximize the...
Question:
Create a loop between 1 to 20.
Print “fizz” if the number is divisible by 3
Print “bizz” if the number is divisible by 5
Print “fizzbizz” if a number is divisible by both 3 and 5.
Otherwise, print the number itself.
Hint: You should use...
Question:
Write a program to print out a calendar for a particular month given the day on which the first of the month occurs together with the number of days in the month.
Your program should take as input an integer representing the day of the week...
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.)
...