0942 - Cifre 23: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

20 May 2023

30 April 2023

1 April 2023

  • curprev 13:1113:11, 1 April 2023Pop Giulia talk contribs 1,046 bytes +565 No edit summary undo
  • curprev 11:4311:43, 1 April 2023Pop Giulia talk contribs 481 bytes +481 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")