A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

6. Магазин за плодове - Stikked
From Small Ostrich, 6 Years ago, written in Python.
Embed
  1. fruit = input().lower()
  2. day = input().lower()
  3. quant = float(input())
  4. price = None
  5.  
  6. if day == 'monday' or day == 'tuesday' or day == 'thursday' \
  7.      or day == 'friday'  or day == 'wednesday' :
  8.     if fruit == 'banana':
  9.         price = 2.50
  10.     elif fruit == 'apple':
  11.         price = 1.20
  12.     elif fruit == 'orange':
  13.         price = 0.85
  14.     elif fruit == 'grapefruit':
  15.         price = 1.45
  16.     elif fruit == 'kiwi':
  17.         price = 2.70
  18.     elif fruit == 'pineapple':
  19.         price = 5.50
  20.     elif fruit == 'grapes':
  21.         price = 3.85
  22.  
  23. elif day == 'saturday' or day == 'sunday':
  24.     if fruit == 'banana':
  25.         price = 2.70
  26.     elif fruit == 'apple':
  27.         price = 1.25
  28.     elif fruit == 'orange':
  29.         price = 0.90
  30.     elif fruit == 'grapefruit':
  31.         price = 1.60
  32.     elif fruit == 'kiwi':
  33.         price = 3.00
  34.     elif fruit == 'pineapple':
  35.         price = 5.60
  36.     elif fruit == 'grapes':
  37.         price = 4.20
  38.  
  39. if price:
  40.     total = price * quant
  41.     print('%.2f' % total)
  42. else:
  43.     print('error')