Posted at 02:33h
in
Uncategorized
by admin
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 02:31h
in
Uncategorized
by admin
Question 1.
Use EasyGui to write a program to convert temperatures from Fahrenheit to Celsius. The formula for that is: Celsius = 5 / 9 * (Fahrenheit – 32). Use GUI input and output. You need to create a easygui enterbox to ask Fahrenheit, then use...
Posted at 02:09h
in
Uncategorized
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 random x...
Problem Description
You may know that March 14 is known as “π-day”, since 3.14 (which is the third month and fourteenth day) is a good approximation of π.
Mathematicians celebrate this day by eating pie.
Suppose that you have n pieces of pie, and k people who are...
Problem DescriptionKen is working for the secret agency. He is going to send a secret message that encodes UPPERCASE words by shifting their letters forward.
Shifting a letter by S positions means to go forward S letters in the alphabet. For example, shifting B by S = 3 positions gives E. However,...
Posted at 00:25h
in
Uncategorized
by admin
Question:
Jack is sending a super special love letter, and because it is so special he doesn’t want anyone (except his crush obviously) to see it.
To stop it from getting into the wrong hands, he has decided to encrypt the letter with a Caeser Cipher (don’t...