Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 17:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Python]INCH in CM Umrechnungstool

Discussion on [Python]INCH in CM Umrechnungstool within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1

 
alg0r!thm's Avatar
 
elite*gold: 65
Join Date: Aug 2010
Posts: 1,365
Received Thanks: 561
[Python]INCH in CM Umrechnungstool

Hallo liebe elitepvpers Community,
ich habe vor kurzem damit begonnen Python zu lernen.
Und nun soll ich laut Buch ein kleines Tool schreiben mit welchem man eine beliebige Anzahl an INCH in CM umwandeln kann.
Das Tool soll einen bestimmten INCH Wert einlesen und diesen dann in einer Variable speichern und ihn danach mit 2.53 (CM) multiplizieren und das Ergebnis soll wiederrum in einer neuen Variable gespeichert werden und dieses Ergebnis soll dann im Endeffekt via. print ausgegeben werden.
So sieht mein Code aus:

PHP Code:
# Eingabe
print ("Wie viel INCH willst du in Zentimeter umrechnen?:")
inch input()

# Berechnung

ergebnis inch 2.53

# Ausgabe des Ergebnises

print (inch)
print (
"INCH sind")
print (
cm)
print (
"Zentimeter"
Ich hoffe ihr könnt mir sagen was mein Fehler ist.
Danke schonmal im Vorraus.

Daniiel'
alg0r!thm is offline  
Old 03/29/2012, 19:41   #2
 
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
Entweder nennst du die Variable "ergebnis" in "cm" um oder "cm" in "ergebnis".
jacky919 is offline  
Old 03/29/2012, 20:04   #3

 
alg0r!thm's Avatar
 
elite*gold: 65
Join Date: Aug 2010
Posts: 1,365
Received Thanks: 561
Danke für den Tipp, doch das Problem war ein ganz anderes ich musste als Datentypen float wählen ist auch logisch. Sonst kann das ganze nich hinhauen.

Daniiel'

//btw. Das Thema kann geschlossen werden.
#closerequest
alg0r!thm is offline  
Reply


Similar Threads Similar Threads
[Python-Modul]EXP-Donator (kompatibel mit Python Loader)
11/23/2013 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 27 Replies
Moin, da man mich danach gefragt hat und ich sowieso mal ein Beispiel für die Benutzung meines Python Loaders veröffentlichen wollte, habe ich die Gelegenheit genutzt und euch eben einen EXP-Spendebot geschrieben. Man kann ihn einfach mit dem oben verlinkten Python Module Loader laden und ihn mit F5 aktivieren/deaktivieren. Sobald ihr mehr als 99 Erfahrungspunkte habt (man kann nur in 100er Schritten spenden), werden alle Erfahrungspunkte an eure Gilde gespendet. Wer Lust hat und...
WTS: Apple Iphone 4 S 64GB/Apple Ipad 2 64GB WI-FI 3G/ Apple imac 27 inch
02/01/2012 - General Gaming Discussion - 0 Replies
APPLE FRANCHISE LIMITED is a recognized distributor of various consumer electronics in conjunction with APPLE COMPANY, we are one of the leading mobile phones distributors.we are legitimate, We specialize in a wide range of products such as, Apple iphones, Apple ipad, Apple Imacs, Apple ipods, Apple Macbooks and mp4 players, video games console (Etc) at affordable prices. For more information regarding purchase. Please contact us via email or messenger. [email protected]...
Python PK bot
10/02/2011 - Dekaron - 6 Replies
any ideas on how to get into Python on SIZ? There is a bot that kills (one hit in my case), every char or bot that comes through the gate.
Python + Eric Python IDE installieren ?!
07/05/2011 - General Coding - 0 Replies
hat sich erledigt.



All times are GMT +1. The time now is 17:50.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.