Answer:
while True:
number = int(input("Enter a number: "))
product = number * 10
if product > 100:
break
print(str(product))
Explanation:
Create a while loop that iterates until a specific condition is created inside
Ask the user for the input
Multiply the input and put the result in product
Check if the product is greater than 100. If it is, stop the loop using break keyword
When the loop is done, print the product
Answer:
You can buy one at gamestop, target, walmart, best buy and probably more stores
Answer:
The internet provides access to an abundance of information from home, making it easier for people to get answers much faster. This efficiency has caused libraries to receive less business and less users, therefore making their service less popular.
Answer:
A class is like a blueprint of object.
Explanation:
A class defines the kinds of data and the functionality their objects will have.
A class enables you to create your own custom types by grouping together variables of other types, methods and events.
In C#, we can create a class using the class keyword.
Here's a sample program:
using System;
namespace ConsoleApplication
{
public class Test
{
public static void Main()
{
Add a1 = new Add(70, 50);
a1.AddNumbers();
Console.ReadLine();
}
}
class Add
{
private int row;
private int column;
public Add(int r, int c)
{
row = r;
column = c;
}
public void AddNumbers()
{
Console.WriteLine(row+column);
}
}
}
output: 120
Explanation of the program:
I have created a class named Add. Within a class, row and column are two fields and AddNumbers() is a method. We also have constructor to initialize row and column.
In main method, If I need to invoke members of the class, I must create an instance of the class. We can create any number of instances using the single class.IN our program, a1 is the reference variable using which we can invoke members of the class. I invoked function in the class and passed arguments to the constructor while creating an instance.
Those values are assigned to method variables and it operated the addition. Thus the output is 120.