Question: Python3 Problem 1. Create four variables A, B, C and D. A contains a random integer between 10 and 20. B = '3', C='A' and
Problem 1. Create four variables A, B, C and D. A contains a random integer between 10 and 20. B = '3', C='A' and the value of D is given by the user; it contains the email address of the user. Print the value of A. 2. Create a new variable Z. This variable is the concatenation of B and C. Print the value of Z. 3. Use a python function to convert the value of A in binary base. Print this value. 4. Use a python function to convert the value of Z in base 10. Print this value. 5. Print the characters from index 2 to 6 by twos of the variable D. 5. Print the characters from index -2 to 2 by reverse of the variable D. 7. Print the content of the variable D in capital case. 8. Create a new variable i. This variable contains the position of the character '@' in the variable D. 9. Replace the server name in the variable D by 'gmail.com'. For example, if the write 'mohamed@yahoo.com result the user should be 'mohamed@gmail.com 10. Print the new value of D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
