-
Language
Python
-
Description
It asks the name, the gender, and the salary to an user.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os, sys
your_name = input ('Enter the your name: ')
your_salary = float (input ('Enter the value of your salary: '))
print ('Select the value of gender.')
print ('\t1.- Female')
print ('\t2.- Male')
sys.stdout.write ('\t')
gender = 0
while gender<1 or gender>2:
gender = int (input (': '))
if gender<1 or gender>2:
sys.stdout.write ('Wrong value. Please, enter it again.')
salary=your_salary
if gender==1:
print ('Female')
else:
print ('Male')
print ('Your name: ' + your_name)
print ('Value of salary: ' + repr (salary))
print ()
os.system ('pause')
your_name = input ('Enter the your name: ')
your_salary = float (input ('Enter the value of your salary: '))
print ('Select the value of gender.')
print ('\t1.- Female')
print ('\t2.- Male')
sys.stdout.write ('\t')
gender = 0
while gender<1 or gender>2:
gender = int (input (': '))
if gender<1 or gender>2:
sys.stdout.write ('Wrong value. Please, enter it again.')
salary=your_salary
if gender==1:
print ('Female')
else:
print ('Male')
print ('Your name: ' + your_name)
print ('Value of salary: ' + repr (salary))
print ()
os.system ('pause')