Author: admin
Home > Articles posted by admin (Page 73)
Question 1:
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.
Hint:
You could use...
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...
Question:
We have made class explosion and weapon which showed you how to load different image to switch costumes.
1. Please made a class Planet, it will contains following methods:
__init__(self) - It initials the Planet from a random centerx position, and top = -1000
Since planets has 3...
Posted at 02:39h
in
Uncategorized
by admin
Question:
Create an animation such as the below git image. In the animation, make sure you create a new concentric circle whenever the space key is pressed. Also, make sure you erase the entire concentric circles when the R key is pressed on the keyboard.
...
Posted at 02:36h
in
Uncategorized
by admin
Question:
You are given a string ‘s’ consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them.
We repeatedly make duplicate removals on s until we no longer can.
Return the final string after all such duplicate removals have...
Question:
Alice and Bob have a different total number of candies. You are given two integer arrays aliceSizes and bobSizes where aliceSizes[i] is the number of candies of the ith box of candy that Alice has and bobSizes[j] is the number of candies of the jth...
Question 1.
You probably used a for loop in your program in last homework. That’s how most people would do it. But just for practice, try doing the same thing with a while loop.
You have to use while loop!!!!
Sample Input:
Which multiplication table would you like? 5
Sample Output:
Here’s your table:
5...
Question:
please add two methods in the class HeroApp, check_int() and check_real().
The check_int() method will take 2 arguments str_num and attr and complete the following data validation:
should not be empty.
should be integer number
should in between 1- 100000
The check_real() method will take 2 arguments...
Question 1.
Write a program that asks for your first name, then asks for your last name, and then prints a message with your first and last names in it.
Sample Input:
What is your first name? Kevin
What is your Last name? Zhu
Sample Output:
(it means if user enters the above answer...
Question 1.
You probably used a for loop in your program in last homework. That’s how most people would do it. But just for practice, try doing the same thing with a while loop.
Sample Input:
Which multiplication table would you like? 5
Sample Output:
Here’s your table:
5 x 1 = 5
5 x...