Sum of Dictionary items – Simple Python Program
This is to demonstrate how “dictionary” is used in Python. Name:Value – pairs.
To develop from within
This is to demonstrate how “dictionary” is used in Python. Name:Value – pairs.
This is to check whether the given string is a palindrome or not.
This program uses “for” loop to process the string. islower() and isupper() functions are used to check whether the current character of the string is in lower case or in upper case.
This program gets the series of numbers from the user, then saves it to the array. The array is processed using “for” loop to check each element. If the number is even, add +1 to the value of ecount, else add +1 to the value of ocount variables. To check whether the number is even … Read more
This is a simple program to find the factorial of a given number. This program uses recursive function “factorial(x)”. (Example implementation of a recursive function in python).
This is a simple program to print the Fibonacci series up to the number that the user entered.
FORMULA USED:Area of triangle=1/2breadthheight Area of the Square=lengthlength Area of the rectangle=widthheight Area of the circle=Ï€radiusradius ALGORITHM Step 1: Start the program.Step 2: Get the height and breadth of the triangle.Step 3: Calculate area of triangle using the formula. Area of triangle=1/2breadthheightStep 4: Get the length of the square.Step 5: Calculate area of the square … Read more
Simple program to get 5 different marks from the user and then calculates total marks percentage grade based on the percentage and prints them out.
This program gets the choice of the user whether to convert from Fahrenheit to Celsius or Celsius to Fahrenheit then uses IF and ELIF (header) to run the corresponding conversion code within the blocks (suite) this program also includes an ELSE section to run when an invalid choice is given. Note: ch=ch.upper() converts the value … Read more