\documentclass[a4paper,12pt,onecolumn]{article}%11pt determines the font size,onecolumn can be altered to twocolumn, and a4 determines the size of the page when printed.
\usepackage{enumerate}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage[dvipsnames]{xcolor}%This package allows access to 68 colors.
\usepackage{extramarks}
\usepackage{color,fancyhdr}
%This package is used for fancy headlines.
\usepackage{datetime}
\pagestyle{fancy} 
\fancyhf{}
\fancyheadoffset[RO,LE]{30pt}%RO:Right on odd-numbered page,and RE:Right on even-numbered page and L is for left and the same notation as RE and RO.
\fancyhead[C]{\textbf{}}
\fancyhead[LE]{}%rightmark means section name on right.
\fancyhead[RE]{\thepage}
\fancyhead[RO]{}%leftmark means section name on left.
\fancyhead[LO]{\thepage}%The command \thepage shows the number of the page.
\renewcommand\headrule
{{\color{OliveGreen}%color is used for the color of the header line.
		\hrule height 1.75pt%height and width of the header line.
		width\headwidth
		\vspace{1pt}%
		\hrule height 1.25pt
		width\headwidth
		\vspace{-4pt}}}
\usepackage[alwaysadjust]{paralist}
\usepackage{amsthm,amssymb}%Packages which are critical for mathematical symbols and terminology,provided by Americam Mathematics Society.
\usepackage{leftidx}
\usepackage{gensymb}
\theoremstyle{plain}
\newtheorem{varthm}{تمرین}
\newtheoremstyle{break}%
{3pt}% hSpace abovei1
{3pt}% hSpace belowi1
{\normalfont}% hBody fonti
{}% hIndent amounti2
{\bfseries}% hTheorem head fonti
{:}% hPunctuation after theorem headi
{.5em}% hSpace after theorem headi3
{}% hTheorem head spec (can be left empty, meaning ‘normal’)i
\theoremstyle{break}
\newtheorem*{prf}{حل}
\newtheorem{lem}{حل}[varthm]
\newtheorem{corollary}{لم}[lem]

%As it is apparent,no mention has been made to theorem or any other environment whatsoever,because it is not intended for these environments to be numbered.
\usepackage{geometry}
\geometry{
	a4paper,
	total={170mm,257mm},
	left=20mm,
	top=20mm,
	right=43mm,}
\textwidth =420pt%This width of text and the ensuing quantitiy for margins,is already tested and provides a congenial environment for mathematical articles,specifically articles in Persian.
\marginparwidth= 20pt
\usepackage{graphicx}%To insert images.
\usepackage[normalem]{ulem}
\usepackage[hidelinks]{hyperref}%To cross-reference accross the text.
\hypersetup{colorlinks,linkcolor=RubineRed,urlcolor=blue,citecolor=blue}%Determines the color of the hyperlink and urlcolorlink.
\usepackage{enumerate}%This package is used for creating bulleted,numbered lists.
\usepackage[export]{adjustbox}
\newcommand\marginlabel[1]{\mbox{}\marginpar
	{\raggedright\hspace{0pt}#1}}
\usepackage{babel}
\usepackage{xepersian}
%\defpersianfont{\nast}{IranNastaliq}%to use different fonts in the text.
\renewcommand\qedsymbol{$\blacksquare$}
\settextfont{XB Zar}
\setlatintextfont{Times New Roman}
\setdigitfont{XM Yekan}
\defpersianfont\nast{X Davat}
\setstretch{1.5}
\begin{document}
	\begin{varthm}
		فروشگاهی هر روز $ 100X $ کیلوگرم برنج می‌فروشد، که در آن $ X $ یک متغیر تصادفی با تابع توزیع احتمال زیر است:
		\begin{gather*}
			F(x)=\begin{cases}
				0 & \textsl{\lr{if}}\quad x<0 \\
				kx^{2} & \textsl{\lr{if}}\quad 0\leq x<3 \\
				k(-x^{2}+12x-3) & \textit{\lr{if}}\quad  3\leq x<6 \\
				1 & \textsf{\lr{if}}\quad  x\geq6
			\end{cases}
		\end{gather*}
	\begin{enumerate}[label = \alph*]
		\item
		 مقدار ثابت $ k $ را به‌ دست آورید.
		\item
		 احتمال این‌که فروش این فروشگاه در روز سه‌شنبه‌ی آینده بین ۲۰۰ تا ۴۰۰ کیلوگرم باشد، چقدر است؟
		\item
		 احتمال این‌که فروش این فروشگاه در روز سه‌شنبه‌ی آینده بیش از ۳۰۰ کیلوگرم باشد، چقدر است؟
		\item
		 اگر بدانیم این فروشگاه در روز جمعه‌ی گذشته حداقل ۳۰۰ کیلوگرم فروش داشته است، احتمال این‌که بیش از ۴۰۰ کیلوگرم نفروخته باشد، چقدر است؟
	\end{enumerate}
	\end{varthm}
\begin{prf}
	
\end{prf}
\end{document}