Editing 0942 - Cifre 23
Revision as of 11:43, 1 April 2023 by Pop Giulia (talk | contribs) (Pagină nouă: n = input("Introduceți numărul: ") numar_aparitii = [0, 0] # lista care va contoriza de cate ori apare cifra 2 si cifra 3 # parcurgem cifrele numarului si contorizam for cifra in n: if cifra == '2': numar_aparitii[0] += 1 elif cifra == '3': numar_aparitii[1] += 1 # determinam cifra care apare de cele mai multe ori if numar_aparitii[0] > numar_aparitii[1]: print("2") elif numar_aparitii[1] > numar_aparitii[0]: print("3") else: print("2 3"))
Warning: You are editing an out-of-date revision of this page.
If you publish it, any changes made since this revision will be lost.
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
Retrieved from "http://wiki.universitas.ro/wiki/0942_-_Cifre_23"