Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Element information using Python

28,003 Aufrufe • vor 2 Jahren •via X (Twitter)

4 Kommentare

Profilbild von Python Coding
Python Codingvor 2 Jahren

Element information using Python Free Code:

Profilbild von ᗩᘔKᗩ ᘔᗩᕼIᗪ🕊️
ᗩᘔKᗩ ᘔᗩᕼIᗪ🕊️vor 2 Jahren

I want to fetch data on Pakistan stock exchange by using twitter tweets Is there is any library/ or any code that will be helpful for me!!!!????

Profilbild von Visu
Visuvor 2 Jahren

import periodictable # Function to get information about an element def get_element_info(symbol): # Check if the symbol is valid if not periodictable.elements.symbol(symbol): print("Invalid element symbol.") return # Access information about the specified element element = periodictable.elements.symbol(symbol) # Print information about the element print(f"Element: { print(f"Symbol: {element.symbol}") print(f"Atomic Number: {element.number}") print(f"Atomic Weight: {element.mass}") print(f"Density: {element.density}") nameMap = [] for elm in periodictable.elements: nameMap.append((elm.symbol, nameMap.sort(key=lambda x: x[1]) print(nameMap) print('referece: print('reference: print('Enter one of the above symbols to get information about the element eg Na for sodium(case senstive)') # Prompt the user to input an element symbol element_symbol = input("Enter the symbol of the element: ") # Call the function to get information about the specified element get_element_info(element_symbol)

Profilbild von Rudra
Rudravor 2 Jahren

python project ideas for beginners ?

Ähnliche Videos