diff --git a/.replit b/.replit new file mode 100644 index 0000000..455af93 --- /dev/null +++ b/.replit @@ -0,0 +1,4 @@ +modules = ["python-3.12"] + +[nix] +channel = "stable-24_05" \ No newline at end of file diff --git a/Solutions/array_solution.py b/Solutions/array_solution.py new file mode 100644 index 0000000..be1fc53 --- /dev/null +++ b/Solutions/array_solution.py @@ -0,0 +1,37 @@ +# Exercise: + +l= [2200,2350,2600,2130,2190] # Given list + +# 1 .--> + +print(f"The money spent extra is ${l[1]-l[0]}") + +# 2.--> + + +a= l[:3] +b= sum(a) + +print(f"The expense is ${b}") + +# 3.--> + +for expense in l: + if expense==2000: + print("Yes, You spent exactly $2000 in a moth") + break + + else: + f= False + +if f==False: + print("No,You didn't") + +# 4.--> + +l.append(1980) + +# 5.--> + +l[2]=1830 +
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: