\documentclass[a4paper,italian]{article}
\usepackage[xyz,shuffle]{esami}
        \usepackage{fixltx2e}
        \usepackage[T1]{fontenc}
        \usepackage[utf8,latin1]{inputenc}
        \usepackage{lmodern,textcomp}
%        \usepackage{pst-pdf}

% +=============================+
% |         DEFINITIONS         |
% +=============================+

\def\examname{Seconda prova intercorso di Fisica Generale 1 per Ingegneria Edile (N41)}
\def\numcompiti{4}%%% The number of the versions
\date{2017/12/14}%%% THE DATE IN THE FORMAT YYYY/M/D or D/M/YYYY
\def\Data{\longdate}%%% or \shortdate: the date in the heading\setcounter{1}{1}
\def\cartella{./Esercizi}
\usepackage{babel}

\begin{document}
\testversioni
\pagestyle{esame}

\whiledo{\thevers<\numcompiti}{\stepvers
% +=============================+
% |       THE SEED              |
% +=============================+

%\FPeval\seme{round((\thenomefile+(3*\thevers)):0)}
%%% OR SOME OTHER LIKE
\FPeval\seme{round(\thenomefile*(\thevers)+1-trunc(\thenomefile*(\thevers)/(2^31-1):0)*(2^31-1):0)}
%\FPeval\seme{round(1+abs(\thenomefile/(\thevers)+sin(\thevers)*(\thevers)^(2)):0)}

\randomi=\seme

\permuta
% +=============================+
% |  STUFF DEFINED IN CFG FILE  |
% +=============================+
\testa%%% the heading
%\istruzionii%%%  some instructions

%\begin{esdb}{meca}
	%\selectrandomlyn{1}{Esercizi/meccanica1}
%\end{esdb}	
%\begin{esdb}{mecb}
	%\selectrandomlyn{1}{Esercizi/meccanica2}
%\end{esdb}	
\begin{esdb}{fluid}
		\selectrandomlyn{1}{Esercizi/fluidi1}
\end{esdb}	
\begin{esdb}{calo}
		\selectrandomlyn{1}{Esercizi/calorimetria1}
\end{esdb}	

\closevers
\newpage                                                       
\setcounter{page}{1} %%% dvi
}

\end{document}
