What's new

Help Pa help po python

JayNeiL

Honorary Poster
Joined
Jun 25, 2016
Posts
329
Reaction
219
Points
236
pa help po

1. Create a Python Program using Arithmetic Operators that Divide and Multiply the two
numbers; where variable x = 36 and variable y = 9.
2. Create a Python Program that display the Name and Gender of the user.
 
Sure, I can help you with that!

Here's the code for the first task:

Code:
x = 36
y = 9

# Divide x by y
division_result = x / y
print("Result of division:", division_result)

# Multiply x and y
multiplication_result = x * y
print("Result of multiplication:", multiplication_result)

Output:
Code:
Result of division: 4.0
Result of multiplication: 324

And here's the code for the second task:

Code:
name = input("What is your name? ")
gender = input("What is your gender? ")

print("Name:", name)
print("Gender:", gender)

Output (if the user enters "John" for name and "Male" for gender):
Code:
Name: John
Gender: Male

I hope that helps! Let me know if you have any further questions.
 

Similar threads

Back
Top