Computer Science, asked by ashisharya9651, 3 months ago

Write a program in python to add to no using input function.

2. Write a program to get table of given no by using While Loop.​

Answers

Answered by aradhaya53
1

Answer:

1. Python Program to Add Two Numbers

  1. # This program adds two numbers provided by the user.
  2. # Store input numbers.
  3. # Store input numbers.num1 = input('Enter first number: ')
  4. # Store input numbers.num1 = input('Enter first number: ')num2 = input('Enter second number: ')
  5. # Store input numbers.num1 = input('Enter first number: ')num2 = input('Enter second number: ')# Add two numbers.
  6. # Store input numbers.num1 = input('Enter first number: ')num2 = input('Enter second number: ')# Add two numbers.sum = float(num1) + float(num2)
  7. # Store input numbers.num1 = input('Enter first number: ')num2 = input('Enter second number: ')# Add two numbers.sum = float(num1) + float(num2)# Display the sum.
  8. # Store input numbers.num1 = input('Enter first number: ')num2 = input('Enter second number: ')# Add two numbers.sum = float(num1) + float(num2)# Display the sum.print('The sum of {0} and {1} is {2}'. format(num1, num2, sum))

2. Program #1 : Write a c program to print multiplication table using while loop

Program #1 : Write a c program to print multiplication table using while loopint main()

Program #1 : Write a c program to print multiplication table using while loopint main(){

Program #1 : Write a c program to print multiplication table using while loopint main(){int n, i;

Program #1 : Write a c program to print multiplication table using while loopint main(){int n, i;printf("Enter a Number ");

Program #1 : Write a c program to print multiplication table using while loopint main(){int n, i;printf("Enter a Number ");scanf("%d",&n);

Program #1 : Write a c program to print multiplication table using while loopint main(){int n, i;printf("Enter a Number ");scanf("%d",&n);i=1;

Program #1 : Write a c program to print multiplication table using while loopint main(){int n, i;printf("Enter a Number ");scanf("%d",&n);i=1;while(i<=10){

Program #1 : Write a c program to print multiplication table using while loopint main(){int n, i;printf("Enter a Number ");scanf("%d",&n);i=1;while(i<=10){printf("%d * %d = %d \n", n, i, n*i);

Similar questions