kaburen

Untitled

Mar 23rd, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. def zamien(ciag):
  2.     wyn = ''
  3.     for el in ciag:
  4.         if(el.isdigit()):
  5.             wyn += liczebniki[el] + ' '
  6.     return wyn
  7.    
  8. liczebniki = {'0':'zero','1':'jeden', '2': 'dwa', '3':'trzy', '4':'cztery', '5':'piec', '6':'szesc', '7':'siedem','8':'osiem','9':'dziewiec'}
  9. liczbaIn = input('Podaj liczbe: ')
  10. wyn = zamien(liczbaIn)
  11. print (wyn);
Advertisement
Add Comment
Please, Sign In to add comment