« first day (1871 days earlier)      last day (1485 days later) » 

user11867329
4:19 AM
Oxycodone
 
user11867329
should also be allowed
 
8:27 AM
2 messages moved from Python
 
 
3 hours later…
11:47 AM
i am executing a string of if statement , unable to execute it , giving a error run_cmd=f"if temp_dfi['{i}_levels'].isna().sum() > 0:
print(temp_dfi['{i}_levels'].isna().sum())
temp_dfi['{i}_levels'].fillna('w{uniq_val}', inplace=True)";
exec(run_cmd)
 
1 message moved from Python
 
 
6 hours later…
5:58 PM
import pygame
from pygame.sprite import Sprite

class Star(Sprite):
	"""A class to represent a single star in the fleet."""

	def __init__(self, ai_settings, screen):
		"""Initialize the star and set its starting position."""
		super(Star, self).__init__()
		self.screen = screen
		self.ai_settings = ai_settings

		# Load the star image.
		self.image = pygame.image.load('C:/Users/yoelp/Desktop/Python Works/Stars/images/star.bmp')

		# converting the star to rectangle.
		self.rect = self.image.get_rect()
another module:
from star import Star

def update_screen(star):
	star.blitme()

def create_fleet(ai_settings, screen, stars):
	"""Create a full fleet of stars."""
	# Create a star and find the number of stars in a row.
	# Spacing between each star is equal to one star width.

	# converting the (width) of the star into rectangle

	# Creating an instance of the star.
	star = Star(ai_settings, screen)

	star_width = star.rect.width



	#
	star.x = star_width + 2 * star_width * star_number
 
3 messages moved from Python
 

« first day (1871 days earlier)      last day (1485 days later) »