Python Forum
needing some help to write some code for a game calculator
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
needing some help to write some code for a game calculator
#1
i just want to preface this thread by saying that i am a complete noob with python. i started learning a few days ago, going off of only knowledge about functions in google sheets, and some basic 'python for beginners' tips on how to atleast write some lines.

im attempting to make a calculator for a game, it counts how many hits it takes to kill another player. so far, i only have the damage-afflicting part written. id like to know how i could make a line of code that recognizes if the damage value being output is more than double or half of the original damage value. if it is more than double or half, like 100 to 200, or 100 to 50, id like it to output double or half the value. ie 220 damage gets turned to 200, because its more than double of 100.

if i could get some help with this, thatd be greatly appreciated!
Reply


Messages In This Thread
needing some help to write some code for a game calculator - by rymdaksel - Jan-02-2024, 04:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Wish to write a code for an electronic load and a power supply for measuring Eff Hasan2025 3 588 Yesterday, 06:08 AM
Last Post: DeaD_EyE
  UART write binary code trix 3 1,888 Apr-28-2024, 04:57 PM
Last Post: deanhystad
  write code that resides in parent directory franklin97355 3 1,550 Apr-14-2024, 02:03 AM
Last Post: franklin97355
  Problem with my pong game code Than999 8 6,188 May-15-2022, 06:40 AM
Last Post: deanhystad
  Needing to Check Every Quarter Hour bill_z 10 5,732 Feb-09-2022, 07:23 PM
Last Post: menator01
  Calculator code issue using list kirt6405 4 3,348 Jun-11-2021, 10:13 PM
Last Post: topfox
  How to write a code with İF function? Aycaaxx 1 2,695 Nov-03-2020, 05:46 AM
Last Post: deanhystad
  Music Selection Game Code WyattH 3 3,352 Jul-20-2020, 11:16 AM
Last Post: ndc85430
  Beginner Code, how to print something after a number of turns (guessing game) QTPi 4 3,957 Jun-18-2020, 04:59 PM
Last Post: QTPi
  Noob needing guidance.... bako 0 2,370 Mar-29-2020, 06:55 PM
Last Post: bako

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020