COW Computation Of the Week(1) Task 1 – Create a program that

advertisement
COW
Computation Of the Week(1)
Task 1 – Create a program that sends the following to standard output:
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Level 1 – Do this with as many lines of code as you want
Level 2 – Do this with no spaces sent to standard output
Level 3 – Do this with only one line of code
Task 2 – Create a program that sends the following to standard output:
\
\\
\\\
\\\\
\
\\
\\\
\\\\
\
\\
\\\
\\\\
\
\\
\\\
\\\\
\
\\
\\\
\\\\
\
\\
\\\
\\\\
\
\\
\\\
\\\\
Level 1 – Do this with as many lines of code as you want
Level 2 – Do this with only one line of code
Task 3 – Create a program that sends the following to standard output:
\t
\n
\t
\n
\n
\t
\n
\t
\t
\n
\t
\n
\n
\t
\n
\t
\t
\n
\t
\n
\n
\t
\n
\t
\t
\n
\t
\n
Level 1 – Do this with as many lines of code as you want
Level 2 – Do this with only one line of code
Task 4 – Create a program that sends the following to standard output:
12-
“I like to tab using \t and put in carriage returns using \n.”
“I also really like the way that a \ works.”
Level 1 – Do this with as many lines of code as you want
Level 2 – Do this with only one line of code
Task 5 – Convert the following binary numbers to their decimal and hexadecimal equivalent:
101
1101
101101
11101101
100011101101
10101100011101101
Task 6 – Convert the following decimal numbers to their binary and hexadecimal equivalent:
15
75
486
532467
Project 1A
Part 1 – Make a list of information that would be useful to know about a teacher.
Part 2 – Decide what variable type would best be used to store each piece of information. You do not
need to worry about space requirements.
Part 3 – Write a program that declares and initializes each of those variables then prints them out
neatly to standard output.
Part 4 – Instead of initializing the variables, have the computer ask the user for that information.
Project 1B
Same as 1A except that you are asking about and looking at information about a car.
Project 1C
Same as 1A except that you are asking about and looking at information about a pet.
Task 7 – Say what variable type is absolutely the most ideal to hold the following values. If there is
nothing appropriate then say so.
1. Number of characters on a page
2. Number of pages in a book
3. Number of books in a room
4. Number of rooms in a building
5. Number of books in a building
6. Number of pages in a building
7. The name of a book
8. Average daily temperature (F)
9. Temperature on another planet(F)
10. Your height (ft)
11. Distance from your house to school (ft)
12. Distance from one location on the planet to any other location of the planet (ft)
13. Distance between planets in the same solar system (ft)
14. Distance between stars (ft)
15. The number of dollars in your wallet ($)
16. The amount of money in a bank account ($)
17. The amount of money in the entire world’s economy ($)
18. How old you are (whole years)
19. How old you are (whole days)
20. How old you are (whole seconds)
Task 8 – If you were designing a space shuttle, what are all the possible inputs that would go into the
computer system?
Download