Question:
Troy loves triangles. He especially likes counting triangles. He has an N-by-N grid consisting of either “.” or “#” characters. Help him count the number of triangles formed only by “#” characters in the grid. Triangles are of the form
More formally, a triangle of height h...
Posted at 04:03h
in
Uncategorized
by admin
Question:
Troy loves triangles. He especially likes counting triangles. He has an N-by-N grid consisting of either “.” or “#” characters. Help him count the number of triangles formed only by “#” characters in the grid. Triangles are of the form
More formally, a triangle of height h...
Posted at 02:40h
in
Uncategorized
by admin
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.
...
Posted at 20:45h
in
Uncategorized
by admin
Question:
Problem Description
You are trying to pass the time while at the optometrist. You notice there is a grid of four numbers:
1
2
3
4
You see lots of mirrors and lenses at the optometrist, and wonder how flipping the grid horizontally or vertically would change the grid. Specifically, a...
Posted at 14:54h
in
Uncategorized
by admin
Question 1:
Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:
You probably used a for loop in your program in last homework. That’s how most people would do...
Posted at 03:38h
in
Uncategorized
by admin
Question 1
We are going to continue to work on the 'hero.db' database. Since we have already created a table called "heroes" in the database, we are going to add 2 more records in the table "heroes":
Field
name
hero_level
int_growth
agi_growth
str_growth
hero_int
hero_agi
hero_str
New record 1
Hercules
1
3.6
6
9.9
270
150
140
New record 2
Blade
1
10
18.5
14.5
40
28
39
Question 2:
From all the records in...