CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

I need output for this following python program

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2020, 14:36
Default I need output for this following python program
  #1
New Member
 
Narendra
Join Date: Jun 2020
Posts: 1
Rep Power: 0
Narendra8989 is on a distinguished road
I need Source Code Using a temporary variable in Python


# Python program to swap two variables

x = 5
y = 10

# To take inputs from the user
#x = input('Enter value of x: ')
#y = input('Enter value of y: ')

# create a temporary variable and swap the values
temp = x
x = y
y = temp

print('The value of x after swapping: {}'.format(x))
print('The value of y after swapping: {}'.format(y))
Narendra8989 is offline   Reply With Quote

Reply

Tags
programming, python, python script, python support, software


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forward simulations -- Evaluating objective function only without design modules kensaii SU2 Shape Design 4 April 25, 2020 15:12
[OpenFOAM.com] Trouble building Paraview from ThirdPartyv1812 folder with python and mpi support praphul OpenFOAM Installation 4 April 8, 2019 01:26
[PyFoam] what is the unused output? leroyv OpenFOAM Community Contributions 4 July 4, 2014 04:55
[OpenFOAM] paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7 aylalisa ParaView 4 June 13, 2014 08:52
CentFOAM Python Script Installation: Error socon009 OpenFOAM Installation 2 May 26, 2012 09:36


All times are GMT -4. The time now is 21:25.