Friday, July 16, 2021

# 5. a. Solutions for input function questions

 Practice Programs


Its practice time!!  

1. Create a login form.

     Print(‘Login form’)

  Username=input(‘User Name:’)

  Password=input(‘Password:’) 

  Output: 

  Login form 

  User Name: javed 

  Password:  *****

   2. Using input() function ask for user's name.

Name=input(‘Enter your name:’)

Output:

Enter your name: javed  

 3.  Ask user a numerical question, such as, "Please enter your age."

Age=int(input(‘Please enter your age:’))

Output:

Please enter your age: 22

    4. Using input() function, print() function and ask for the current year, then              print          the answer

Year=int(input(‘Enter current year:’)

Print(‘Current year is’)

Output:

Enter current year: 2021

Current year is 2021

5. Accept two numbers from the user and perform multiplication,addition, subtraction, division, modulus, floor division, power 

number1=int(input('enter first number:')

number2=int(input('enter second number:')

print(number1*number2,'multiplication')

print(number1+number2,'addition')

print(number1-number2,'subtraction')

print(number1/number2,'division')

print(number1%number2,'modulus')

print(number1//number2,'floor division')

print(number1**number2,'power') 

Output:

enter first number:5

enter second number: 2

multiplication:10.0

addition: 7.0

subtraction: 3.0

division: 2.5

modulus:1

floor division: 2

power: 25

 

 

project:

In a college, an awareness webinar was conducted on covid-19 topic. That was conducted by the health department. After the program the department want to know how was the program as feedback from the students. The department decided to take feedback digitally. Can you help the department by writing program on feedback form so that they can easily get their feedback.

first_name= input('first name:')

last_name=input('second name:')

emailid=input('emailid:')

print('What percentage of the information was new to you?')

q1=input('Select: 100% 75% 50% 25% 0%')

print('I can use this session information:')

q2=input('Select: Immediately In 2-6 months In 7-12 months Never')

print('Would you like to learn more about this topic?')

q3=input('Select: Yes No')

print('Please rate the speaker’s knowledge of the topic:')

q4=input('Select: Excellent Good Fair Poor')

print('Please rate the speaker’s presentation skills:')

q5=input('Select: Excellent Good Fair Poor')

print('Please rate the content of the slides/virtual aids:')

q6=input('Select: Excellent Good Fair Poor')

print('How accurate was the session description?')

q7=input('Select: Excellent Good Fair Poor')

print('How did the session compare to your expectations?')

q8=input('Select: Excellent Good Fair Poor')

print('Overall session evaluation:')

q9=input('Select: Excellent Good Fair Poor')

print('How likely are you to recommend this session to a colleague? (with 10 being most likely to recommend)')

q10=input('Select: 0 1 2 3 4 5 6 7 8 9 10')

print('Please rate your overall experience:')

q11=input('Select: Excellent Good Fair Poor')

Output:

first name: javed 

second name: mohammed

emailid: javedmohammed@gmail.com

What percentage of the information was new to you?

Select: 100% 75% 50% 25% 0%  : 50

I can use this session information:

Select: Immediately In 2-6 months In 7-12 months Never : 5

Would you like to learn more about this topic?

Select: Yes No : yes

Please rate the speaker’s knowledge of the topic:

Select: Excellent Good Fair Poor : excellent

Please rate the speaker’s presentation skills:

Select: Excellent Good Fair Poor : excellent

Please rate the content of the slides/virtual aids:

Select: Excellent Good Fair Poor : excellent

How accurate was the session description?

Select: Excellent Good Fair Poor : good

How did the session compare to your expectations?

Select: Excellent Good Fair Poor : good

Overall session evaluation:

Select: Excellent Good Fair Poor : fair

How likely are you to recommend this session to a colleague? (with 10 being most likely to recommend)

Select: 0 1 2 3 4 5 6 7 8 9 10 : 9

Please rate your overall experience:

Select: Excellent Good Fair Poor : excellence


HAPPY LEARNING👍

PLEASE READ AND FOLLOW US💜

😇THANKS FOR SUPPORTING😇 


No comments:

Post a Comment