Answer to Question #268164 in Java | JSP | JSF for BRND

Question #268164

 Big-Sightedness

by CodeChum Admin

I got my grandmother a new phone because I thought that we could talk more everyday by texting. Well, let’s just say that my grandma’s eyes aren’t the best anymore so she can’t really see what I text her and because of that she wants to ditch texting and stick with carrier pigeons. You know how embarrassing it is for a kid like me to be seen using carrier pigeons?!?! Well, anyway, I was hoping that you could make a program that takes my text and make it bigger, a LOT bigger. How about you test it out by only using the letters A, B, and C first.


Input


1. My text


Description

This is a string with characters A, B, and C.

Constraints

It is guaranteed that all letters are in uppercase.

Output

The first line will contain a message prompt to input my text.

The succeeding lines will contain the enlarged text.

Enter·my·text:·ABC

***·**··***
*·*·*·*·*
***·**··*
*·*·*·*·*
*·*·**··***
1
Expert's answer
2021-11-18T15:21:16-0500
import pygame
from pygame.locals import *


pygame.init()
pygame.font.init()
def createFont(t,s=83,c=(255,255,0), b=False,i=False):
    font = pygame.font.SysFont("Times New Roman", s, bold=b, italic=i)
    mytext = font.render(t, True, c)
    return mytext
str1 = input("Input your text: ")
game_over = createFont(str1)




sf = pygame.display.set_mode((500, 300))
loop = True
clock = pygame.time.Clock()
while loop == True:
    sf.fill((0,0,0))
    x, y = pygame.mouse.get_pos()
    sf.blit(game_over, (100,150))
    for e in pygame.event.get():
        if e.type == QUIT:
            loop = 0
    pygame.display.update()
    clock.tick(60)


pygame.quit()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS