Posts
Showing posts from October, 2020
CALCULATING ARMSTRONG NUMBERS EASY TO CALCULATE AND UNDERSTANDABLE
- Get link
- Other Apps
CALCULATING ARMSTRONG NUMBER IN PYTHON LANGUAGE
- Get link
- Other Apps
Code:- while True : """ 128649 1^6+2^6+8^6+6^6.... """ a = input ( " FIRST LET ME KNOW THE NUMBER WHAT IS IT? : " ) power = len ( a ) li = [] if a == " quit " . lower (): quit () #print(power) for i in a : e = int ( i ) ** power li . append ( e ) #print(li) #print(sum(li)) if sum ( li ) == int ( a ): print ( f " { a } is an armstrong number." ) else: print ( f " { a } is not an armstrong number." ) while True : """ 128649 1^6+2^6+8^6+6^6.... """ a = input ( " FIRST LET ME KNOW THE NUMBER WHAT IS IT? : " ) power = len ( a ) li = [] if a == " quit " . lower (): quit () #print(power) for i in a : e = int ( i ) ** power li . append ( e ) #print(li
MY FIRST MYSQL PROJECT I EVER MADE
- Get link
- Other Apps
FIRST FILE CODE: import mysql . connector as connector ab = 0 asking = int ( input ( " How many numbers you actually want to add: " )) if asking == 0 : pass quit () else: while ab < asking : asking -= 1 name = input ( " Enter The name you want to add: " ) number = int ( input ( " Enter the number you want to add: " )) a = connector . Connect ( host = " localhost " , user = " root " , password = " 9.8.9.9.6.7.7.4.1.1. " ) cur = a . cursor () #cur.execute("show databases") #results = cur.fetchall() #cur.execute("create database telephone_directory") cur . execute ( " use telephone_directory " ) #cur.execute("create table telephone_directory(name char(200), # numbers bigint(12))") cur . execute ( f "in
MAKING QRCODES IN PYTHON LANGUAGE OR PYTHON 3 LANGUAGE(AND YOU CAN SCAN THIS QR CODE [THE GIVEN IMAGE ON THIS BLOG])
- Get link
- Other Apps
PYTHON OR PYTHON 3 PROGRAM FOR GAME STONE, PAPER, SCISSOR
- Get link
- Other Apps
import random choices = [ " stone " , " scissor " , " paper " ] computer_choice = random . choice ( choices ) coputer_score = 0 player_score = 0 while True : player_choice = input ( " Enter Your choice from stone, paper, scissor: " ) if computer_choice == player_choice . lower (): print ( " It is a draw here " ) pass elif computer_choice == " stone " and player_choice . lower () == " paper " : player_score += 1 print ( " Here Player Wins!!! " ) elif computer_choice == " stone " and player_choice . lower () == " scissor " : coputer_score += 1 print ( " Here Computer Wins!!! " ) elif computer_choice == " paper " and player_choice . lower () == " stone " : coputer_score += 1 print ( " Here Co