Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

While Loop

While Loop tells the computer to do something as long as the condition is met. Its
construct consist of a block of code and a condition. The condition is evaluated, and if the
condition is true, the code within the block is excuted.

Problem: Write a progam to count the digit of the given number.

Java Code

Python Code
Problem: Write a program to reverse the digit of the given number.

Java Code

Python Code
Problem: Write a program to guess the number.

Java Code

Python Code

Question 1: Write a program to find first and last digit of a number.

Question 2: Write a program to find if the number is palindrome or not. (Input should
be taken from user).

You might also like