Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions