Question: 1. Define a function named yearsToHours, which converts years to the total number of hours and returns the hours. Assume there are 365 days in
1. Define a function named yearsToHours, which converts years to the total number of hours and returns the hours. Assume there are 365 days in a year. Then write a program that prompt the user to enter the number of years, and call yearsToHours function to show the number of hours that the years have. Use a main function in your program.
2. Write a turtle graphics program to draw the following shape and color:
Hint:
for i = 10, 20, 30,..., 250 do the following:
Walk forward i steps Turn left 90 degrees
4.What command correctly generates the sequence 4, 8, 12?
5. Which of the following is NOT a logical expression?
| True and True | ||
| x == y or y | ||
| x != 5 | ||
| not False |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
