Posted at 00:21h
in
Uncategorized
by admin
Question:
Create the following * pattern image base on your input
Hint:
Remember when we multiply a string by a number, the string is repeated the number times.
>>> '*' * 10
'**********'
Also you would need 2 for loops to solve the question
Sample Input 1:
3
Sample Output 1:
***
**
*
*
**
***
Sample Input 2:
5
Sample Output...
Posted at 00:19h
in
Uncategorized
by admin
Question:
The International Standard Book Number (ISBN) is a 13-digit code for identifying books. These numbers have a special property for detecting whether the number was written correctly.
The 1-3-sum of a 13-digit number is calculated by multiplying the digits alternately by 1’s and 3’s (see example)...
Posted at 00:17h
in
Uncategorized
by admin
Question:
The International Standard Book Number (ISBN) is a 13-digit code for identifying books. These numbers have a special property for detecting whether the number was written correctly.
The 1-3-sum of a 13-digit number is calculated by multiplying the digits alternately by 1’s and 3’s (see example)...
Question:
Write code to reverse a string using recursion:
Sample Input 1:
Apple
Sample Output 1:
epplA
Sample Input 2:
Orange
Sample Outpute 2:
egnarO...
Posted at 00:54h
in
Uncategorized
by admin
Question 1:
Write a program that does the following:
Generates a random secret number between 1 and 100 (including 1 and 100).
Asks the user to guess the secret number, then tell them whether they guessed too low, too high, or exactly right.
Keeps the game going until...
Posted at 00:53h
in
Uncategorized
by admin
Question:
Complete the code we did for a simple calculator. Add the button to do subtraction, division and find the exponent for num1^num2...