Posts

Showing posts from 2017

Design a Calculator Using C# code.

Image
Design a Calculator  What you will need: A computer running Windows 7 or higher Visual Studio: Any version               Download: http://www.visualstudio.com                 I will be using the 2010 version of Visual Studio in this tutorial, but every version is pretty similar. Step 1: Creating a New Project Step 2: Designing the Application         Step 3: Creating Event Handlers 3.1. Double click a button.  This will bring you to the "Form1.cs" tab.  This is where all of your code will be written.  Notice a section has been pre-written for you based off of the "Click" event.  This section of code will be executed when that specific button is clicked.  For the sake of this project, we will call these Event Handlers. 3.2. Double click all of your buttons so you have an event handler for ea...

PYTHON - "Basic Program"

🐎 PYTHON - "Basic Program" 🙌  1. Add two number and Input taken from keyboard Number1 = input("Enter the first number:") Number2 = input("Enter the second number:") Sum = float(Number1) + (Number2) print('sum of {0} and {1} is equal to {2}'.format(Number1,Number2,Sum)) Output: Enter the first number: 12 Enter the second number: 34 Sum of 12 and 34 is equal to 46 2. Swap two numbers by use third variable. a = input('Enter value of a: ') b = input('Enter value of b: ') temp = a a = b b = temp print('After swapping a: {}'.format(a)) print('After swapping b: {}'.format(b)) Output: Enter value of a: 43 Enter value of b: 22 After swapping a: 22 After swapping b: 43 3. Check ODD and EVEN number. num = int(input("Enter any number: ")) if (num % 2)==0:     print("{0} is Even".format(num)) else:     print("{0} is Odd".format(num)) Output:...