impauto
Impauto
اجعل حياتك أسهل مع المدخلات الآلية
pip install impautoالطريقة الأساسية لاستخدام هذه الوحدة
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( 154 )
# use your script as normal
def syracuse ( x ):
step = 0
while x != 1 :
x = ( 3 * x + 1 ) if x % 2 else ( x // 2 )
step += 1
return step
n = int ( input ( "Enter a number: " ))
print ( syracuse ( n ))يمكنك أيضًا إخفاء رسائل الإدخال الطرفية
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( 1 , 2 , 3 , show_message = False )بشكل افتراضي ، سوف يثير استثناء إذا كان هناك مدخلات أكثر من القيمة المعطاة. لجعل الإدخال يتكرر إلى أجل غير مسمى ، يمكنك استخدام هذا الرمز
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( "a" , "b" , forever = True )© 2020 حقوق الطبع والنشر Edhyjox
تم ترخيص هذا المستودع بموجب ترخيص معهد ماساتشوستس للتكنولوجيا. انظر الترخيص للحصول على التفاصيل.