Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: logging vs print
Post: logging vs print

I'm learning to use logging in every project but, I'm starting to question the difference between logging.info vs print() they seem to have the same use. I've read the official documentation at https:...
syafiq14 General Coding Help 2 1,874 Aug-28-2021, 04:26 AM
    Thread: shooting system in asteroid games
Post: shooting system in asteroid games

I'm making a game like the classic asteroid game, I can make the movement and acceleration but I don't understand how to make the shooting system similar to the original game. code : class Player(p...
syafiq14 Game Development 1 2,642 Apr-17-2021, 05:48 AM
    Thread: bird jump in flappy bird games
Post: bird jump in flappy bird games

I am making a game like flappy bird from scratch but I am confused about how to fly / jump that birds do in the game Flappy Bird .. How to do it? import pygame import sys pygame.init() window = py...
syafiq14 Game Development 1 2,137 Dec-14-2020, 12:41 PM
    Thread: why the position of the object is different?
Post: why the position of the object is different?

I tried changing the object's position with the center of get_rect () and I got a different result without using center and using center My game screen size: 400, 300 This code changes the object to...
syafiq14 Game Development 1 1,904 Nov-24-2020, 01:51 AM
    Thread: pygame blit() method
Post: pygame blit() method

why when I put the second argument of the blit() method with surf.get_rect() the image becomes in the upper left corner of the screen? When I change the integer value it remains at the top left corner...
syafiq14 Game Development 1 4,836 Oct-30-2020, 07:22 AM
    Thread: TypeError: 'NoneType' object is not subscriptable
Post: TypeError: 'NoneType' object is not subscriptable

I'm trying to check whether the user entered the correct path or not. when the output appears it doesn't give any error but when i close the output it gets an error : Traceback (most recent call last...
syafiq14 General Coding Help 3 5,168 Sep-26-2020, 07:44 AM
    Thread: my code is messy .. how do i not get messy
Post: RE: my code is messy .. how do i not get messy

(Aug-27-2020, 03:44 AM)nilamo Wrote: 1) yes your code is messy. Yes it can be improved. 2) but first, answer this: why? If you're only making this for your own use, I'm not sure it really matters....
syafiq14 Code Review 3 3,161 Aug-27-2020, 03:57 AM
    Thread: my code is messy .. how do i not get messy
Post: my code is messy .. how do i not get messy

I've heard about modular programming where we break the code into a separate module but I don't understand which parts I have to separate and where they all put together... and this my code I'm here...
syafiq14 Code Review 3 3,161 Aug-27-2020, 03:25 AM
    Thread: how to add elements in the other window? (pysimplegui)
Post: how to add elements in the other window? (pysimple...

I want to add text elements every time I press the "Add" button import PySimpleGUI as sg layout1 = [ [ sg.InputText(size=(15, 1), justification="center", key="-OUTPUT-"), ...
syafiq14 GUI 0 2,311 Jul-20-2020, 10:35 PM
    Thread: how do I make a number only print once but the number keeps on decreasing?
Post: RE: how do I make a number only print once but the...

(Jan-03-2020, 07:36 AM)perfringo Wrote: Some general observations: Your code has repeating parts (rows #5-16 & #27-35). You should write function instead of writing code blocks twice. Also yo...
syafiq14 General Coding Help 5 2,889 Jan-03-2020, 08:52 AM
    Thread: how do I make a number only print once but the number keeps on decreasing?
Post: how do I make a number only print once but the num...

import time import winsound # User Input plan = input("What Your Plan For Today? : ").lower() times = int(input("What Number? : ")) choose = input("Minute?Second?Hour? : ").lower() user = 'yes' # Ch...
syafiq14 General Coding Help 5 2,889 Jan-03-2020, 06:40 AM
    Thread: how to make a program with a certain number of multiples?
Post: RE: how to make a program with a certain number of...

(Jan-01-2020, 01:50 PM)sandeep_ganga Wrote: Try below to see if that helps, x=int(input("enter max numbers to test: ")) y=int(input("multiple of whihc number to be different: ")) i=1 while (i <=...
syafiq14 General Coding Help 3 2,696 Jan-01-2020, 02:39 PM
    Thread: how to make a program with a certain number of multiples?
Post: how to make a program with a certain number of mul...

how to make a program if it met with certain multiples of these numbers will produce a different output example: I have numbers 1 - 20 these numbers will have the same output except 2, 4, 6, 8, 10, 12...
syafiq14 General Coding Help 3 2,696 Jan-01-2020, 12:48 PM

User Panel Messages

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