Monthly Archives: March 2020

Python GUI Find Factorial by Recursive Function

Topic: Find Factorial by Recursive Function Python GUI Program   # Python GUI program Find Factorial # of a Number by Recursion # Input a number and show its factorial # using a user defined recursive factorial function # www.EasyCodeBook.com from tkinter import * def inputn(): n= int(entry.get()) # call recursive_factorial function fact= recursive_factorial(n) str1… Read More »

Loading

Python GUI Multiplication Table

Topic: Multiplication Table Python GUI Program Python GUI Multiplication Table # Python GUI program Multiplication Table # Input a number and show its multiplication table # from 1 to 10 # www.EasyCodeBook.com from tkinter import * def show_table(): num = int(entry.get()) str1=’ Table of ‘ + str(num) + ‘\n—————–\n’ for i in range(1,11): str1 =… Read More »

Loading

Python GUI Area of Triangle

Topic:Python GUI Program Area of Triangle with base and height # Python GUI Program to calculate # Area of a Triangle # When base and height given # www.EasyCodebook.com from tkinter import * def calculate_area(): base = float(entry1.get()) height = float(entry2.get()) area = 1 / 2 * base * height output_label.configure(text = ‘ Area of… Read More »

Loading

Python GUI Temperature Conversion Program C To F

Topic: Python GUI Temperature Conversion Program Celsius to Fahrenhiet # Python GUI program Temperature conversion # Celsius to Faherenheit # Input Celsius, Find Fahrenheit # www.EasyCodeBook.com from tkinter import * def convert_temperature(): temp = float(entry.get()) temp = 9/5 * temp+32 output_label.configure(text = ‘ Converted to Fahrenheit: {:.1f} ‘ .format(temp)) main_window = Tk() main_window.title(“www.EasyCodeBook.com”) message_label =… Read More »

Loading

Python GUI Program Temperature Conversion Fahrenheit to Celsius

Topic: Python GUI Program Temperature Conversion Fahrenheit to Celsius # Python GUI program Temperature conversion # Faherenheit to Celsius # Input Faherenheit Find Celsius # www.EasyCodeBook.com from tkinter import * def convert_temperature(): temp = float(entry.get()) temp = (temp – 32) * 5/9 output_label.configure(text = ‘ Converted to Celsius: {:.1f} ‘ .format(temp)) main_window = Tk() main_window.title(“www.EasyCodeBook.com”)… Read More »

Loading

Python Program To Print a to z using for loop and chr function

Topic: Python Program To Print a to z using for loop and chr() function We will use the built-in Python function chr() to print the small alphabets from a to z. We know that the Ascii code of ‘a’ is 97 and that of ‘z’ is 122. Therefore we will use a range() function in… Read More »

Loading