Skip to content

Instantly share code, notes, and snippets.

View mdrezwi's full-sized avatar

mdrezwi

  • Joined Jun 9, 2025
View GitHub Profile
nums = [
12, 45, 23, 67, 34, 89, 22, 90, 56, 78,
101, 5, 48, 92, 33, 77, 505, 64, 29, 87, 19,
120, 44, 58, 39, 73, 11, 84, 65, 95, 60,
13, 102, 150, 99, 88, 215, 299, 201, 158, 506
]
n = nums[0]
while len(nums) > 0:
user_feedback = [
"user123|rating:4|comment:Good service",
"user456|rating:N/A|comment:Late delivery",
"user789|rating:5|comment:Excellent!",
"user321|rating:2|comment:Bad packaging",
"user654|rating:ERROR|comment:--",
"user987|rating:3|comment:Average experience",
"user112|rating:5|comment:Quick delivery",
"user198|rating:1|comment:Very poor support",
"user345|rating:INVALID|comment:No response",
log_data = [
"door,open,10:30",
"window,open,10:31",
"door,open,10:45",
"light,ON,10:32",
"door,close,11:40",
"light,OFF,16:32",
"light,Malfunctioned,16:35",
"door,open,21:35",
"door,open,10:30",
log_data = [
"door,open,10:30",
"window,open,10:31",
"door,open,10:45",
"light,ON,10:32",
"door,close,11:40",
"light,OFF,16:32",
"light,Malfunctioned,16:35",
"door,open,21:35",
"door,open,10:30",
#write a program to take input age from user:
#
# # we are using here _ , throwable variable ( placeholder variable)
try:
for _ in range(3):
a = input("Enter the age : ")
temperatures = []
# > 60 is cold , < 60 >75 is comfortable , <75 is hot
try:
for _ in range(3):
# try:
t = input("Input temperature : ")
t = int(t)
my_numbers = []
try:
for i in range(5):
try:
n = int(input("Enter a number: "))
my_numbers.append(n)
except ValueError:
print("Invalid input, try again")
fruits = ["apple", "banana", "grapes", "pineapple"]
query = input("Ener any fruit name : ")
# this is global variable
# means, it is available for any code in this file
available = False
counter = 0
a=10
b=30
print("Product of " + repr(a)+" and "+repr(b)+" is "+repr(a*b))
temp = 37
temp_d = 40
print("Current temperature is :", temp)
print("Max temp allowed is :", temp_d)