├── handler.py ├── info.txt ├── main.py └── manage.py /handler.py: -------------------------------------------------------------------------------- 1 | def phones(): 2 | print("1-aplle\n2-samsung\n3-xiaomi") 3 | user = int(input("Enter number of your choice : ")) 4 | info_dict = {"User_name" : "", "User_number" : "" ,"User_address" : "" , "payment" : "" , "Phone" : "" , "quantity" : "" , "vip" : ""} 5 | delivery = 12 6 | is_vip = f"{False}\n" 7 | info_dict["vip"] = is_vip 8 | if user == 1 : 9 | print("1-iphoneX \nprice = 1200\n2-iphone12 \nprice = 1400\n3-iphone6s \nprice = 500\n4-iphone14 \nprice = 2000".title()) 10 | phone_choice = int(input("Enter number of phone you want : ")) 11 | if phone_choice == 1 : 12 | phone = "IphoneX" 13 | how = int(input("Enetr quantity : ")) 14 | price = 1200 15 | name = input("Enter yourname : ") 16 | number = int(input("Enter your phone number : ")) 17 | address = input("Enter your address : ") 18 | res = how * price + delivery 19 | info_dict["User_name"] = name 20 | info_dict["User_number"] = number 21 | info_dict["User_address"] = address 22 | info_dict["payment"] = res 23 | info_dict["Phone"] = phone 24 | info_dict["quantity"] = how 25 | with open(file="info.txt",mode="a") as file : 26 | for key,value in info_dict.items(): 27 | file.write(f"{key} : {value} \n") 28 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 29 | if phone_choice == 2 : 30 | phone = "iphone12" 31 | how = int(input("Enetr quantity : ")) 32 | price = 1400 33 | name = input("Enter yourname : ") 34 | number = int(input("Enter your phone number : ")) 35 | address = input("Enter your address : ") 36 | res = how * price + delivery 37 | info_dict["User_name"] = name 38 | info_dict["User_number"] = number 39 | info_dict["User_address"] = address 40 | info_dict["payment"] = res 41 | info_dict["Phone"] = phone 42 | info_dict["quantity"] = how 43 | with open(file="info.txt",mode="a") as file : 44 | for key,value in info_dict.items(): 45 | file.write(f"{key} : {value} \n") 46 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 47 | if phone_choice == 3 : 48 | phone = "iphone6s" 49 | how = int(input("Enetr quantity : ")) 50 | price = 500 51 | name = input("Enter yourname : ") 52 | number = int(input("Enter your phone number : ")) 53 | address = input("Enter your address : ") 54 | res = how * price + delivery 55 | info_dict["User_name"] = name 56 | info_dict["User_number"] = number 57 | info_dict["User_address"] = address 58 | info_dict["payment"] = res 59 | info_dict["Phone"] = phone 60 | info_dict["quantity"] = how 61 | with open(file="info.txt",mode="a") as file : 62 | for key,value in info_dict.items(): 63 | file.write(f"{key} : {value} \n") 64 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 65 | if phone_choice == 4 : 66 | phone = "iphone14" 67 | how = int(input("Enetr quantity : ")) 68 | price = 2000 69 | name = input("Enter yourname : ") 70 | number = int(input("Enter your phone number : ")) 71 | address = input("Enter your address : ") 72 | res = how * price + delivery 73 | info_dict["User_name"] = name 74 | info_dict["User_number"] = number 75 | info_dict["User_address"] = address 76 | info_dict["payment"] = res 77 | info_dict["Phone"] = phone 78 | info_dict["quantity"] = how 79 | with open(file="info.txt",mode="a") as file : 80 | for key,value in info_dict.items(): 81 | file.write(f"{key} : {value} \n") 82 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 83 | if user == 2 : 84 | print("1-not10pro \nprice = 1700\n2-s21Ultra \nprice = 1900\n3-J7 \nprice = 300\n4-j5 \nprice = 200".title()) 85 | phone_choice = int(input("Enter number of phone you want : ")) 86 | delivery = 12 87 | if phone_choice == 1 : 88 | phone = "not10pro" 89 | how = int(input("Enetr quantity : ")) 90 | price = 1700 91 | name = input("Enter yourname : ") 92 | number = int(input("Enter your phone number : ")) 93 | address = input("Enter your address : ") 94 | res = how * price + delivery 95 | info_dict["User_name"] = name 96 | info_dict["User_number"] = number 97 | info_dict["User_address"] = address 98 | info_dict["payment"] = res 99 | info_dict["Phone"] = phone 100 | info_dict["quantity"] = how 101 | with open(file="info.txt",mode="a") as file : 102 | for key,value in info_dict.items(): 103 | file.write(f"{key} : {value} \n") 104 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 105 | if phone_choice == 2 : 106 | phone = "s21Ultra" 107 | how = int(input("Enetr quantity : ")) 108 | price = 1900 109 | name = input("Enter yourname : ") 110 | number = int(input("Enter your phone number : ")) 111 | address = input("Enter your address : ") 112 | res = how * price + delivery 113 | info_dict["User_name"] = name 114 | info_dict["User_number"] = number 115 | info_dict["User_address"] = address 116 | info_dict["payment"] = res 117 | info_dict["Phone"] = phone 118 | info_dict["quantity"] = how 119 | with open(file="info.txt",mode="a") as file : 120 | for key,value in info_dict.items(): 121 | file.write(f"{key} : {value} \n") 122 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 123 | if phone_choice == 3 : 124 | phone = "J7" 125 | how = int(input("Enetr quantity : ")) 126 | price = 300 127 | name = input("Enter yourname : ") 128 | number = int(input("Enter your phone number : ")) 129 | address = input("Enter your address : ") 130 | res = how * price + delivery 131 | info_dict["User_name"] = name 132 | info_dict["User_number"] = number 133 | info_dict["User_address"] = address 134 | info_dict["payment"] = res 135 | info_dict["Phone"] = phone 136 | info_dict["quantity"] = how 137 | with open(file="info.txt",mode="a") as file : 138 | for key,value in info_dict.items(): 139 | file.write(f"{key} : {value} \n") 140 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 141 | if phone_choice == 4 : 142 | phone = "j5" 143 | how = int(input("Enetr quantity : ")) 144 | price = 200 145 | name = input("Enter yourname : ") 146 | number = int(input("Enter your phone number : ")) 147 | address = input("Enter your address : ") 148 | res = how * price + delivery 149 | info_dict["User_name"] = name 150 | info_dict["User_number"] = number 151 | info_dict["User_address"] = address 152 | info_dict["payment"] = res 153 | info_dict["Phone"] = phone 154 | info_dict["quantity"] = how 155 | with open(file="info.txt",mode="a") as file : 156 | for key,value in info_dict.items(): 157 | file.write(f"{key} : {value} \n") 158 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 159 | if user == 3 : 160 | print("1-Note 10 lite \nprice = 1200\n2-poco X3 \nprice = 1400\n3-poco F3 \nprice = 500\n4-note 8pro \nprice = 2000".title()) 161 | phone_choice = int(input("Enter number of phone you want : ")) 162 | delivery = 12 163 | if phone_choice == 1 : 164 | phone = "Note 10lite" 165 | how = int(input("Enetr quantity : ")) 166 | price = 1200 167 | name = input("Enter yourname : ") 168 | number = int(input("Enter your phone number : ")) 169 | address = input("Enter your address : ") 170 | res = how * price + delivery 171 | info_dict["User_name"] = name 172 | info_dict["User_number"] = number 173 | info_dict["User_address"] = address 174 | info_dict["payment"] = res 175 | info_dict["Phone"] = phone 176 | info_dict["quantity"] = how 177 | with open(file="info.txt",mode="a") as file : 178 | for key,value in info_dict.items(): 179 | file.write(f"{key} : {value} \n") 180 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 181 | if phone_choice == 2 : 182 | phone = "poco x3" 183 | how = int(input("Enetr quantity : ")) 184 | price = 1400 185 | name = input("Enter yourname : ") 186 | number = int(input("Enter your phone number : ")) 187 | address = input("Enter your address : ") 188 | res = how * price + delivery 189 | info_dict["User_name"] = name 190 | info_dict["User_number"] = number 191 | info_dict["User_address"] = address 192 | info_dict["payment"] = res 193 | info_dict["Phone"] = phone 194 | info_dict["quantity"] = how 195 | with open(file="info.txt",mode="a") as file : 196 | for key,value in info_dict.items(): 197 | file.write(f"{key} : {value} \n") 198 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 199 | if phone_choice == 3 : 200 | phone = "poco f3" 201 | how = int(input("Enetr quantity : ")) 202 | price = 500 203 | name = input("Enter yourname : ") 204 | number = int(input("Enter your phone number : ")) 205 | address = input("Enter your address : ") 206 | res = how * price + delivery 207 | info_dict["User_name"] = name 208 | info_dict["User_number"] = number 209 | info_dict["User_address"] = address 210 | info_dict["payment"] = res 211 | info_dict["Phone"] = phone 212 | info_dict["quantity"] = how 213 | with open(file="info.txt",mode="a") as file : 214 | for key,value in info_dict.items(): 215 | file.write(f"{key} : {value} \n") 216 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 217 | if phone_choice == 4 : 218 | phone = "note 8pro" 219 | how = int(input("Enetr quantity : ")) 220 | price = 2000 221 | name = input("Enter yourname : ") 222 | number = int(input("Enter your phone number : ")) 223 | address = input("Enter your address : ") 224 | res = how * price + delivery 225 | info_dict["User_name"] = name 226 | info_dict["User_number"] = number 227 | info_dict["User_address"] = address 228 | info_dict["payment"] = res 229 | info_dict["Phone"] = phone 230 | info_dict["quantity"] = how 231 | with open(file="info.txt",mode="a") as file : 232 | for key,value in info_dict.items(): 233 | file.write(f"{key} : {value} \n") 234 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 235 | 236 | 237 | 238 | 239 | 240 | def laptops(): 241 | print("1-HP\n2-Asus\n3-Lenovo") 242 | user = int(input("Enter number of your choice : ")) 243 | info_dict = {"User_name" : "", "User_number" : "" ,"User_address" : "" , "payment" : "" , "Laotop" : "" , "quantity" : "" , "vip" : ""} 244 | delivery = 12 245 | is_vip = f"{False}\n" 246 | info_dict["vip"] = is_vip 247 | if user == 1: 248 | print("1-Zenbook \nprice = 3200\n2-Zedbook \nprice = 5400\n3-Notebook \nprice = 2500\n4-deltaBook \nprice = 4000".title()) 249 | user_choice = int(input("Enter number of laptop you want : ")) 250 | if user_choice == 1 : 251 | laptop = "Zen book" 252 | how = int(input("Enetr quantity : ")) 253 | price = 3200 254 | name = input("Enter your Name : ") 255 | number = int(input("Enter your phone number : ")) 256 | address = input("Enter your address : ") 257 | res = how * price + delivery 258 | info_dict["User_name"] = name 259 | info_dict["User_number"] = number 260 | info_dict["User_address"] = address 261 | info_dict["payment"] = res 262 | info_dict["Laotop"] = laptop 263 | info_dict["quantity"] = how 264 | with open(file="info.txt",mode="a") as file : 265 | for key,value in info_dict.items(): 266 | file.write(f"{key} : {value} \n") 267 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 268 | if user_choice == 2 : 269 | laptop = "Zedbook" 270 | how = int(input("Enetr quantity : ")) 271 | price = 5400 272 | name = input("Enter your Name : ") 273 | number = int(input("Enter your phone number : ")) 274 | address = input("Enter your address : ") 275 | res = how * price + delivery 276 | info_dict["User_name"] = name 277 | info_dict["User_number"] = number 278 | info_dict["User_address"] = address 279 | info_dict["payment"] = res 280 | info_dict["Laotop"] = laptop 281 | info_dict["quantity"] = how 282 | with open(file="info.txt",mode="a") as file : 283 | for key,value in info_dict.items(): 284 | file.write(f"{key} : {value} \n") 285 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 286 | if user_choice == 3 : 287 | laptop = "notebook" 288 | how = int(input("Enetr quantity : ")) 289 | price = 2500 290 | name = input("Enter your Name : ") 291 | number = int(input("Enter your phone number : ")) 292 | address = input("Enter your address : ") 293 | res = how * price + delivery 294 | info_dict["User_name"] = name 295 | info_dict["User_number"] = number 296 | info_dict["User_address"] = address 297 | info_dict["payment"] = res 298 | info_dict["Laotop"] = laptop 299 | info_dict["quantity"] = how 300 | with open(file="info.txt",mode="a") as file : 301 | for key,value in info_dict.items(): 302 | file.write(f"{key} : {value} \n") 303 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 304 | if user_choice == 4 : 305 | laptop = "deltabook" 306 | how = int(input("Enetr quantity : ")) 307 | price = 4000 308 | name = input("Enter your Name : ") 309 | number = int(input("Enter your phone number : ")) 310 | address = input("Enter your address : ") 311 | res = how * price + delivery 312 | info_dict["User_name"] = name 313 | info_dict["User_number"] = number 314 | info_dict["User_address"] = address 315 | info_dict["payment"] = res 316 | info_dict["Laotop"] = laptop 317 | info_dict["quantity"] = how 318 | with open(file="info.txt",mode="a") as file : 319 | for key,value in info_dict.items(): 320 | file.write(f"{key} : {value} \n") 321 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 322 | if user == 2: 323 | print("1-Xl555 \nprice = 3200\n2-babybook \nprice = 5400\n3-xl550 \nprice = 2500\n4-tuf fx15 \nprice = 4000".title()) 324 | user_choice = int(input("Enter number of laptop you want : ")) 325 | if user_choice == 1 : 326 | laptop = "xl555" 327 | how = int(input("Enetr quantity : ")) 328 | price = 3200 329 | name = input("Enter your Name : ") 330 | number = int(input("Enter your phone number : ")) 331 | address = input("Enter your address : ") 332 | res = how * price + delivery 333 | info_dict["User_name"] = name 334 | info_dict["User_number"] = number 335 | info_dict["User_address"] = address 336 | info_dict["payment"] = res 337 | info_dict["Laotop"] = laptop 338 | info_dict["quantity"] = how 339 | with open(file="info.txt",mode="a") as file : 340 | for key,value in info_dict.items(): 341 | file.write(f"{key} : {value} \n") 342 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 343 | if user_choice == 2 : 344 | laptop = "babybook" 345 | how = int(input("Enetr quantity : ")) 346 | price = 5400 347 | name = input("Enter your Name : ") 348 | number = int(input("Enter your phone number : ")) 349 | address = input("Enter your address : ") 350 | res = how * price + delivery 351 | info_dict["User_name"] = name 352 | info_dict["User_number"] = number 353 | info_dict["User_address"] = address 354 | info_dict["payment"] = res 355 | info_dict["Laotop"] = laptop 356 | info_dict["quantity"] = how 357 | with open(file="info.txt",mode="a") as file : 358 | for key,value in info_dict.items(): 359 | file.write(f"{key} : {value} \n") 360 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 361 | if user_choice == 3 : 362 | laptop = "xl550" 363 | how = int(input("Enetr quantity : ")) 364 | price = 2500 365 | name = input("Enter your Name : ") 366 | number = int(input("Enter your phone number : ")) 367 | address = input("Enter your address : ") 368 | res = how * price + delivery 369 | info_dict["User_name"] = name 370 | info_dict["User_number"] = number 371 | info_dict["User_address"] = address 372 | info_dict["payment"] = res 373 | info_dict["Laotop"] = laptop 374 | info_dict["quantity"] = how 375 | with open(file="info.txt",mode="a") as file : 376 | for key,value in info_dict.items(): 377 | file.write(f"{key} : {value} \n") 378 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 379 | if user_choice == 4 : 380 | laptop = "tuf fx15" 381 | how = int(input("Enetr quantity : ")) 382 | price = 4000 383 | name = input("Enter your Name : ") 384 | number = int(input("Enter your phone number : ")) 385 | address = input("Enter your address : ") 386 | res = how * price + delivery 387 | info_dict["User_name"] = name 388 | info_dict["User_number"] = number 389 | info_dict["User_address"] = address 390 | info_dict["payment"] = res 391 | info_dict["Laotop"] = laptop 392 | info_dict["quantity"] = how 393 | with open(file="info.txt",mode="a") as file : 394 | for key,value in info_dict.items(): 395 | file.write(f"{key} : {value} \n") 396 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 397 | if user == 3: 398 | print("1-lenovoX \nprice = 3200\n2-touch \nprice = 5400\n3-Xbook \nprice = 2500\n4-gaming \nprice = 4000".title()) 399 | user_choice = int(input("Enter number of laptop you want : ")) 400 | if user_choice == 1 : 401 | laptop = "lenovox" 402 | how = int(input("Enetr quantity : ")) 403 | price = 3200 404 | name = input("Enter your Name : ") 405 | number = int(input("Enter your phone number : ")) 406 | address = input("Enter your address : ") 407 | res = how * price + delivery 408 | info_dict["User_name"] = name 409 | info_dict["User_number"] = number 410 | info_dict["User_address"] = address 411 | info_dict["payment"] = res 412 | info_dict["Laotop"] = laptop 413 | info_dict["quantity"] = how 414 | with open(file="info.txt",mode="a") as file : 415 | for key,value in info_dict.items(): 416 | file.write(f"{key} : {value} \n") 417 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 418 | if user_choice == 2 : 419 | laptop = "touch" 420 | how = int(input("Enetr quantity : ")) 421 | price = 5400 422 | name = input("Enter your Name : ") 423 | number = int(input("Enter your phone number : ")) 424 | address = input("Enter your address : ") 425 | res = how * price + delivery 426 | info_dict["User_name"] = name 427 | info_dict["User_number"] = number 428 | info_dict["User_address"] = address 429 | info_dict["payment"] = res 430 | info_dict["Laotop"] = laptop 431 | info_dict["quantity"] = how 432 | with open(file="info.txt",mode="a") as file : 433 | for key,value in info_dict.items(): 434 | file.write(f"{key} : {value} \n") 435 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 436 | if user_choice == 3 : 437 | laptop = "Xbook" 438 | how = int(input("Enetr quantity : ")) 439 | price = 2500 440 | name = input("Enter your Name : ") 441 | number = int(input("Enter your phone number : ")) 442 | address = input("Enter your address : ") 443 | res = how * price + delivery 444 | info_dict["User_name"] = name 445 | info_dict["User_number"] = number 446 | info_dict["User_address"] = address 447 | info_dict["payment"] = res 448 | info_dict["Laotop"] = laptop 449 | info_dict["quantity"] = how 450 | with open(file="info.txt",mode="a") as file : 451 | for key,value in info_dict.items(): 452 | file.write(f"{key} : {value} \n") 453 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 454 | if user_choice == 4 : 455 | laptop = "gaming" 456 | how = int(input("Enetr quantity : ")) 457 | price = 4000 458 | name = input("Enter your Name : ") 459 | number = int(input("Enter your phone number : ")) 460 | address = input("Enter your address : ") 461 | res = how * price + delivery 462 | info_dict["User_name"] = name 463 | info_dict["User_number"] = number 464 | info_dict["User_address"] = address 465 | info_dict["payment"] = res 466 | info_dict["Laotop"] = laptop 467 | info_dict["quantity"] = how 468 | with open(file="info.txt",mode="a") as file : 469 | for key,value in info_dict.items(): 470 | file.write(f"{key} : {value} \n") 471 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 472 | 473 | 474 | 475 | 476 | def foods(): 477 | print("1-Break Fast\n2-lunch\n3-dinner") 478 | user = int(input("Enter number of your choice : ")) 479 | info_dict = {"User_name" : "", "User_number" : "" ,"User_address" : "" , "payment" : "" , "foods" : "" , "quantity" : "","vip" : ""} 480 | delivery = 12 481 | is_vip = f"{False}\n" 482 | info_dict["vip"] = is_vip 483 | if user == 1: 484 | print("1-Egg \nprice = 20\n2-Bread \nprice = 10\n3-cereal \nprice = 30\n4-milk \nprice = 5".title()) 485 | user_choice = int(input("Enter number of laptop you want : ")) 486 | if user_choice == 1 : 487 | food = "egg" 488 | how = int(input("Enetr quantity : ")) 489 | price = 20 490 | name = input("Enter your Name : ") 491 | number = int(input("Enter your phone number : ")) 492 | address = input("Enter your address : ") 493 | res = how * price + delivery 494 | info_dict["User_name"] = name 495 | info_dict["User_number"] = number 496 | info_dict["User_address"] = address 497 | info_dict["payment"] = res 498 | info_dict["foods"] = food 499 | info_dict["quantity"] = how 500 | with open(file="info.txt",mode="a") as file : 501 | for key,value in info_dict.items(): 502 | file.write(f"{key} : {value} \n") 503 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 504 | if user_choice == 2 : 505 | food = "bread" 506 | how = int(input("Enetr quantity : ")) 507 | price = 10 508 | name = input("Enter your Name : ") 509 | number = int(input("Enter your phone number : ")) 510 | address = input("Enter your address : ") 511 | res = how * price + delivery 512 | info_dict["User_name"] = name 513 | info_dict["User_number"] = number 514 | info_dict["User_address"] = address 515 | info_dict["payment"] = res 516 | info_dict["foods"] = food 517 | info_dict["quantity"] = how 518 | with open(file="info.txt",mode="a") as file : 519 | for key,value in info_dict.items(): 520 | file.write(f"{key} : {value} \n") 521 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 522 | if user_choice == 3 : 523 | food = "cerel" 524 | how = int(input("Enetr quantity : ")) 525 | price = 30 526 | name = input("Enter your Name : ") 527 | number = int(input("Enter your phone number : ")) 528 | address = input("Enter your address : ") 529 | res = how * price + delivery 530 | info_dict["User_name"] = name 531 | info_dict["User_number"] = number 532 | info_dict["User_address"] = address 533 | info_dict["payment"] = res 534 | info_dict["foods"] = food 535 | info_dict["quantity"] = how 536 | with open(file="info.txt",mode="a") as file : 537 | for key,value in info_dict.items(): 538 | file.write(f"{key} : {value} \n") 539 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 540 | if user_choice == 4 : 541 | food = "milk" 542 | how = int(input("Enetr quantity : ")) 543 | price = 5 544 | name = input("Enter your Name : ") 545 | number = int(input("Enter your phone number : ")) 546 | address = input("Enter your address : ") 547 | res = how * price + delivery 548 | info_dict["User_name"] = name 549 | info_dict["User_number"] = number 550 | info_dict["User_address"] = address 551 | info_dict["payment"] = res 552 | info_dict["foods"] = food 553 | info_dict["quantity"] = how 554 | with open(file="info.txt",mode="a") as file : 555 | for key,value in info_dict.items(): 556 | file.write(f"{key} : {value} \n") 557 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 558 | if user == 2: 559 | print("1-fish \nprice = 200\n2-kebab \nprice = 90\n3-chicken \nprice = 50\n4-beef \nprice = 100".title()) 560 | user_choice = int(input("Enter number of laptop you want : ")) 561 | if user_choice == 1 : 562 | food = "fish" 563 | how = int(input("Enetr quantity : ")) 564 | price = 200 565 | name = input("Enter your Name : ") 566 | number = int(input("Enter your phone number : ")) 567 | address = input("Enter your address : ") 568 | res = how * price + delivery 569 | info_dict["User_name"] = name 570 | info_dict["User_number"] = number 571 | info_dict["User_address"] = address 572 | info_dict["payment"] = res 573 | info_dict["foods"] = food 574 | info_dict["quantity"] = how 575 | with open(file="info.txt",mode="a") as file : 576 | for key,value in info_dict.items(): 577 | file.write(f"{key} : {value} \n") 578 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 579 | if user_choice == 2 : 580 | food = "kebab" 581 | how = int(input("Enetr quantity : ")) 582 | price = 90 583 | name = input("Enter your Name : ") 584 | number = int(input("Enter your phone number : ")) 585 | address = input("Enter your address : ") 586 | res = how * price + delivery 587 | info_dict["User_name"] = name 588 | info_dict["User_number"] = number 589 | info_dict["User_address"] = address 590 | info_dict["payment"] = res 591 | info_dict["foods"] = food 592 | info_dict["quantity"] = how 593 | with open(file="info.txt",mode="a") as file : 594 | for key,value in info_dict.items(): 595 | file.write(f"{key} : {value} \n") 596 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 597 | if user_choice == 3 : 598 | food = "chicken" 599 | how = int(input("Enetr quantity : ")) 600 | price = 50 601 | name = input("Enter your Name : ") 602 | number = int(input("Enter your phone number : ")) 603 | address = input("Enter your address : ") 604 | res = how * price + delivery 605 | info_dict["User_name"] = name 606 | info_dict["User_number"] = number 607 | info_dict["User_address"] = address 608 | info_dict["payment"] = res 609 | info_dict["foods"] = food 610 | info_dict["quantity"] = how 611 | with open(file="info.txt",mode="a") as file : 612 | for key,value in info_dict.items(): 613 | file.write(f"{key} : {value} \n") 614 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 615 | if user_choice == 4 : 616 | food = "beef" 617 | how = int(input("Enetr quantity : ")) 618 | price = 100 619 | name = input("Enter your Name : ") 620 | number = int(input("Enter your phone number : ")) 621 | address = input("Enter your address : ") 622 | res = how * price + delivery 623 | info_dict["User_name"] = name 624 | info_dict["User_number"] = number 625 | info_dict["User_address"] = address 626 | info_dict["payment"] = res 627 | info_dict["foods"] = food 628 | info_dict["quantity"] = how 629 | with open(file="info.txt",mode="a") as file : 630 | for key,value in info_dict.items(): 631 | file.write(f"{key} : {value} \n") 632 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 633 | if user == 3: 634 | print("1-fish \nprice = 200\n2-kebab \nprice = 90\n3-chicken \nprice = 50\n4-beef \nprice = 100".title()) 635 | user_choice = int(input("Enter number of laptop you want : ")) 636 | if user_choice == 1 : 637 | food = "fish" 638 | how = int(input("Enetr quantity : ")) 639 | price = 200 640 | name = input("Enter your Name : ") 641 | number = int(input("Enter your phone number : ")) 642 | address = input("Enter your address : ") 643 | res = how * price + delivery 644 | info_dict["User_name"] = name 645 | info_dict["User_number"] = number 646 | info_dict["User_address"] = address 647 | info_dict["payment"] = res 648 | info_dict["foods"] = food 649 | info_dict["quantity"] = how 650 | with open(file="info.txt",mode="a") as file : 651 | for key,value in info_dict.items(): 652 | file.write(f"{key} : {value} \n") 653 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 654 | if user_choice == 2 : 655 | food = "kebab" 656 | how = int(input("Enetr quantity : ")) 657 | price = 90 658 | name = input("Enter your Name : ") 659 | number = int(input("Enter your phone number : ")) 660 | address = input("Enter your address : ") 661 | res = how * price + delivery 662 | info_dict["User_name"] = name 663 | info_dict["User_number"] = number 664 | info_dict["User_address"] = address 665 | info_dict["payment"] = res 666 | info_dict["foods"] = food 667 | info_dict["quantity"] = how 668 | with open(file="info.txt",mode="a") as file : 669 | for key,value in info_dict.items(): 670 | file.write(f"{key} : {value} \n") 671 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 672 | if user_choice == 3 : 673 | food = "chicken" 674 | how = int(input("Enetr quantity : ")) 675 | price = 50 676 | name = input("Enter your Name : ") 677 | number = int(input("Enter your phone number : ")) 678 | address = input("Enter your address : ") 679 | res = how * price + delivery 680 | info_dict["User_name"] = name 681 | info_dict["User_number"] = number 682 | info_dict["User_address"] = address 683 | info_dict["payment"] = res 684 | info_dict["foods"] = food 685 | info_dict["quantity"] = how 686 | with open(file="info.txt",mode="a") as file : 687 | for key,value in info_dict.items(): 688 | file.write(f"{key} : {value} \n") 689 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 690 | if user_choice == 4 : 691 | food = "beef" 692 | how = int(input("Enetr quantity : ")) 693 | price = 100 694 | name = input("Enter your Name : ") 695 | number = int(input("Enter your phone number : ")) 696 | address = input("Enter your address : ") 697 | res = how * price + delivery 698 | info_dict["User_name"] = name 699 | info_dict["User_number"] = number 700 | info_dict["User_address"] = address 701 | info_dict["payment"] = res 702 | info_dict["foods"] = food 703 | info_dict["quantity"] = how 704 | with open(file="info.txt",mode="a") as file : 705 | for key,value in info_dict.items(): 706 | file.write(f"{key} : {value} \n") 707 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 708 | 709 | 710 | 711 | 712 | 713 | def clothes(): 714 | print("1-Pants\n2- T-shirt\n3-pijames") 715 | user = int(input("Enter number of your choice : ")) 716 | info_dict = {"User_name" : "", "User_number" : "" ,"User_address" : "" , "payment" : "" , "clothes" : "" , "quantity" : "","vip" : ""} 717 | delivery = 12 718 | is_vip = f"{False}\n" 719 | info_dict["vip"] = is_vip 720 | if user == 1: 721 | print("1-zara\nprice = 200\n2-gucci \nprice = 1000\n3-fendi \nprice = 300\n4-Trapstar \nprice = 5000".title()) 722 | user_choice = int(input("Enter number of laptop you want : ")) 723 | if user_choice == 1 : 724 | pants = "zara" 725 | how = int(input("Enetr quantity : ")) 726 | price = 200 727 | name = input("Enter your Name : ") 728 | number = int(input("Enter your phone number : ")) 729 | address = input("Enter your address : ") 730 | res = how * price + delivery 731 | info_dict["User_name"] = name 732 | info_dict["User_number"] = number 733 | info_dict["User_address"] = address 734 | info_dict["payment"] = res 735 | info_dict["clothes"] = pants 736 | info_dict["quantity"] = how 737 | with open(file="info.txt",mode="a") as file : 738 | for key,value in info_dict.items(): 739 | file.write(f"{key} : {value} \n") 740 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 741 | if user_choice == 2 : 742 | pants = "gucci" 743 | how = int(input("Enetr quantity : ")) 744 | price = 1000 745 | name = input("Enter your Name : ") 746 | number = int(input("Enter your phone number : ")) 747 | address = input("Enter your address : ") 748 | res = how * price + delivery 749 | info_dict["User_name"] = name 750 | info_dict["User_number"] = number 751 | info_dict["User_address"] = address 752 | info_dict["payment"] = res 753 | info_dict["clothes"] = pants 754 | info_dict["quantity"] = how 755 | with open(file="info.txt",mode="a") as file : 756 | for key,value in info_dict.items(): 757 | file.write(f"{key} : {value} \n") 758 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 759 | if user_choice == 3 : 760 | pants = "fendi" 761 | how = int(input("Enetr quantity : ")) 762 | price = 300 763 | name = input("Enter your Name : ") 764 | number = int(input("Enter your phone number : ")) 765 | address = input("Enter your address : ") 766 | res = how * price + delivery 767 | info_dict["User_name"] = name 768 | info_dict["User_number"] = number 769 | info_dict["User_address"] = address 770 | info_dict["payment"] = res 771 | info_dict["clothes"] = pants 772 | info_dict["quantity"] = how 773 | with open(file="info.txt",mode="a") as file : 774 | for key,value in info_dict.items(): 775 | file.write(f"{key} : {value} \n") 776 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 777 | if user_choice == 4 : 778 | pants = "TrapStar" 779 | how = int(input("Enetr quantity : ")) 780 | price = 5 781 | name = input("Enter your Name : ") 782 | number = int(input("Enter your phone number : ")) 783 | address = input("Enter your address : ") 784 | res = how * price + delivery 785 | info_dict["User_name"] = name 786 | info_dict["User_number"] = number 787 | info_dict["User_address"] = address 788 | info_dict["payment"] = res 789 | info_dict["clothes"] = pants 790 | info_dict["quantity"] = how 791 | with open(file="info.txt",mode="a") as file : 792 | for key,value in info_dict.items(): 793 | file.write(f"{key} : {value} \n") 794 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 795 | if user == 2: 796 | print("1-zara\nprice = 200\n2-gucci \nprice = 1000\n3-fendi \nprice = 300\n4-Trapstar \nprice = 5000".title()) 797 | user_choice = int(input("Enter number of laptop you want : ")) 798 | if user_choice == 1 : 799 | pants = "zara" 800 | how = int(input("Enetr quantity : ")) 801 | price = 200 802 | name = input("Enter your Name : ") 803 | number = int(input("Enter your phone number : ")) 804 | address = input("Enter your address : ") 805 | res = how * price + delivery 806 | info_dict["User_name"] = name 807 | info_dict["User_number"] = number 808 | info_dict["User_address"] = address 809 | info_dict["payment"] = res 810 | info_dict["clothes"] = pants 811 | info_dict["quantity"] = how 812 | with open(file="info.txt",mode="a") as file : 813 | for key,value in info_dict.items(): 814 | file.write(f"{key} : {value} \n") 815 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 816 | if user_choice == 2 : 817 | pants = "gucci" 818 | how = int(input("Enetr quantity : ")) 819 | price = 1000 820 | name = input("Enter your Name : ") 821 | number = int(input("Enter your phone number : ")) 822 | address = input("Enter your address : ") 823 | res = how * price + delivery 824 | info_dict["User_name"] = name 825 | info_dict["User_number"] = number 826 | info_dict["User_address"] = address 827 | info_dict["payment"] = res 828 | info_dict["clothes"] = pants 829 | info_dict["quantity"] = how 830 | with open(file="info.txt",mode="a") as file : 831 | for key,value in info_dict.items(): 832 | file.write(f"{key} : {value} \n") 833 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 834 | if user_choice == 3 : 835 | pants = "fendi" 836 | how = int(input("Enetr quantity : ")) 837 | price = 300 838 | name = input("Enter your Name : ") 839 | number = int(input("Enter your phone number : ")) 840 | address = input("Enter your address : ") 841 | res = how * price + delivery 842 | info_dict["User_name"] = name 843 | info_dict["User_number"] = number 844 | info_dict["User_address"] = address 845 | info_dict["payment"] = res 846 | info_dict["clothes"] = pants 847 | info_dict["quantity"] = how 848 | with open(file="info.txt",mode="a") as file : 849 | for key,value in info_dict.items(): 850 | file.write(f"{key} : {value} \n") 851 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 852 | if user_choice == 4 : 853 | pants = "TrapStar" 854 | how = int(input("Enetr quantity : ")) 855 | price = 5 856 | name = input("Enter your Name : ") 857 | number = int(input("Enter your phone number : ")) 858 | address = input("Enter your address : ") 859 | res = how * price + delivery 860 | info_dict["User_name"] = name 861 | info_dict["User_number"] = number 862 | info_dict["User_address"] = address 863 | info_dict["payment"] = res 864 | info_dict["clothes"] = pants 865 | info_dict["quantity"] = how 866 | with open(file="info.txt",mode="a") as file : 867 | for key,value in info_dict.items(): 868 | file.write(f"{key} : {value} \n") 869 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 870 | if user == 3: 871 | print("1-zara\nprice = 200\n2-gucci \nprice = 1000\n3-fendi \nprice = 300\n4-Trapstar \nprice = 5000".title()) 872 | user_choice = int(input("Enter number of laptop you want : ")) 873 | if user_choice == 1 : 874 | pants = "zara" 875 | how = int(input("Enetr quantity : ")) 876 | price = 200 877 | name = input("Enter your Name : ") 878 | number = int(input("Enter your phone number : ")) 879 | address = input("Enter your address : ") 880 | res = how * price + delivery 881 | info_dict["User_name"] = name 882 | info_dict["User_number"] = number 883 | info_dict["User_address"] = address 884 | info_dict["payment"] = res 885 | info_dict["clothes"] = pants 886 | info_dict["quantity"] = how 887 | with open(file="info.txt",mode="a") as file : 888 | for key,value in info_dict.items(): 889 | file.write(f"{key} : {value} \n") 890 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 891 | if user_choice == 2 : 892 | pants = "gucci" 893 | how = int(input("Enetr quantity : ")) 894 | price = 1000 895 | name = input("Enter your Name : ") 896 | number = int(input("Enter your phone number : ")) 897 | address = input("Enter your address : ") 898 | res = how * price + delivery 899 | info_dict["User_name"] = name 900 | info_dict["User_number"] = number 901 | info_dict["User_address"] = address 902 | info_dict["payment"] = res 903 | info_dict["clothes"] = pants 904 | info_dict["quantity"] = how 905 | with open(file="info.txt",mode="a") as file : 906 | for key,value in info_dict.items(): 907 | file.write(f"{key} : {value} \n") 908 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 909 | if user_choice == 3 : 910 | pants = "fendi" 911 | how = int(input("Enetr quantity : ")) 912 | price = 300 913 | name = input("Enter your Name : ") 914 | number = int(input("Enter your phone number : ")) 915 | address = input("Enter your address : ") 916 | res = how * price + delivery 917 | info_dict["User_name"] = name 918 | info_dict["User_number"] = number 919 | info_dict["User_address"] = address 920 | info_dict["payment"] = res 921 | info_dict["clothes"] = pants 922 | info_dict["quantity"] = how 923 | with open(file="info.txt",mode="a") as file : 924 | for key,value in info_dict.items(): 925 | file.write(f"{key} : {value} \n") 926 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") 927 | if user_choice == 4 : 928 | pants = "TrapStar" 929 | how = int(input("Enetr quantity : ")) 930 | price = 5 931 | name = input("Enter your Name : ") 932 | number = int(input("Enter your phone number : ")) 933 | address = input("Enter your address : ") 934 | res = how * price + delivery 935 | info_dict["User_name"] = name 936 | info_dict["User_number"] = number 937 | info_dict["User_address"] = address 938 | info_dict["payment"] = res 939 | info_dict["clothes"] = pants 940 | info_dict["quantity"] = how 941 | with open(file="info.txt",mode="a") as file : 942 | for key,value in info_dict.items(): 943 | file.write(f"{key} : {value} \n") 944 | print(f"you should pay {res} dollars\nyour shopping is saccussfuly!") -------------------------------------------------------------------------------- /info.txt: -------------------------------------------------------------------------------- 1 | User_name : pouya 2 | User_number : 7567 3 | User_address : iouh 4 | payment : 5612 5 | Phone : iphone12 6 | quantity : 4 7 | vip : False 8 | 9 | User_name : pouya 10 | User_number : 7687 11 | User_address : hilukh 12 | payment : 3012 13 | Phone : iphone6s 14 | quantity : 6 15 | vip : False 16 | 17 | User_name : pouya zohrehvand 18 | User_number : 9381304043 19 | User_address : tehran sharyar vaien 20 | payment : 6012 21 | Phone : note 8pro 22 | quantity : 3 23 | vip : False 24 | 25 | User_name : pouya 26 | User_number : 9381304043 27 | User_address : oqepd 28 | payment : 412 29 | foods : fish 30 | quantity : 2 31 | vip : False 32 | 33 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from handler import * 2 | print("------------- Welcome to py shop -------------") 3 | print("1-phones\n2-laptops\n3-foods\n4-clothes\n5-exit".title()) 4 | 5 | user_choice = int(input("Enter number what you want : ")) 6 | 7 | if user_choice == 1: 8 | phones() 9 | choice = input("do want get back y/n? ") 10 | if choice == "y": 11 | print("1-phones\n2-laptops\n3-foods\n4-clothes\n5-exit".title()) 12 | user_option = int(input("Enter number what you want : ")) 13 | if user_option == 1: 14 | phones() 15 | elif choice == "n" : 16 | print("Thanks for your shoping") 17 | 18 | 19 | if user_choice == 2: 20 | laptops() 21 | choice = input("do want get back y/n? ") 22 | if choice == "y": 23 | print("1-phones\n2-laptops\n3-foods\n4-clothes\n5-exit".title()) 24 | user_option = int(input("Enter number what you want : ")) 25 | if user_option == 2: 26 | laptops() 27 | elif choice == "n" : 28 | print("Thanks for your shoping") 29 | 30 | 31 | 32 | if user_choice == 3: 33 | foods() 34 | choice = input("do want get back y/n? ") 35 | if choice == "y": 36 | print("1-phones\n2-laptops\n3-foods\n4-clothes\n5-exit".title()) 37 | user_option = int(input("Enter number what you want : ")) 38 | if user_option == 3: 39 | foods() 40 | elif choice == "n" : 41 | print("Thanks for your shoping") 42 | 43 | 44 | 45 | if user_choice == 4: 46 | clothes() 47 | choice = input("do want get back y/n? ") 48 | if choice == "y": 49 | print("1-phones\n2-laptops\n3-foods\n4-clothes\n5-exit".title()) 50 | user_option = int(input("Enter number what you want : ")) 51 | if user_option == 4: 52 | laptops() 53 | elif choice == "n" : 54 | print("Thanks for your shoping") -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | --------------------------------------------------------------------------------